Source/Packages

Representation.Schema

packages/representations/src/Representation/Schema.alpha

701 lines99 declarations24.8 KiBSHA-256 209c8ba5712e

def · lines 605–629

updatePlanDigest

Full file
The state digest a plan's transition produces: the ordered record of every state it writes. Dropping or duplicating one step changes it.
605def updatePlanDigest =
606  (lambda unrestricted plan : (family StdList (family UpdateStep)) .
607    (stdListFold
608      (family UpdateStep)
609      Bytes
610      (lambda unrestricted step : (family UpdateStep) .
611        (lambda unrestricted rest : Bytes .
612          (bytes-append
613            (eliminate
614              UpdateStep
615              (lambda unrestricted current : (family UpdateStep) . Bytes)
616              step
617              (branch
618                UpdateParameter
619                parameter
620                .
621                (bytes-append b"p:" (updatePathBytes (parameterIdentityComponentsOf parameter))))
622              (branch
623                UpdateLearnerState
624                slot
625                .
626                (bytes-append b"s:" (updatePathBytes (learnerStateSlotKey slot)))))
627            (bytes-append b";" rest))))
628      b""
629      plan))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.