~/bend-docscommunity

machine.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.6/machine.bend as Machine

4 imports
import Base
import ./deferred_command.bend as Deferred
import ./trace_facts.bend as TraceFacts
import transaction.bend as Tx

Types

type Pending source · line 9 · raw

@V:Data -> Data

Experimental machine metadata. World and component owners remain arbitrary Type. This module follows the pinned reference marker snapshot semantics; that behavior is not approval of the disputed blanket next-marker retention requirement.

type Transition source · line 13 · raw

@V:Data -> Data

type Slot source · line 17 · raw

@S:Data -> @M:Data -> @V:Data -> Data

type CurrentView source · line 22 · raw

@S:Data -> @M:Data -> @V:Data -> Data

Public capability projections intentionally expose less than debug metadata.

type NextView source · line 25 · raw

@S:Data -> @M:Data -> @V:Data -> Data

type Family source · line 47 · raw

@S:Data -> @M:Data -> @V:Data -> @W:Type -> @-take:(@_:W -> Pair(W, Slot<S, M, V>)) -> @-put:(@_:W -> @_:Slot<S, M, V> -> W) -> Data

type QueueInput source · line 51 · raw

@V:Data -> Data

type Snapshot source · line 55 · raw

@V:Data -> Data

type Applied source · line 59 · raw

@S:Data -> @M:Data -> @V:Data -> Data

type Condition source · line 161 · raw

@V:Data -> Data

type Marker source · line 202 · raw

@S:Data -> @W:Type -> Type

A heterogeneous marker snapshot owns each callback exactly once. Each callback captures a Data machine value and closed lenses, never a world/component owner.

type OwnedMarker source · line 216 · raw

@S:Data -> @W:Type -> @H:Type -> Type

Registered schedule/transition owners live alongside the world and are also threaded, rather than copied into one closure per machine.

Templates

template current_view source · line 29 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @slot:Slot<S, M, V> -> CurrentView<S, M, V>

template pending_view source · line 33 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @pending:Pending<V> -> NextView<S, M, V>

template next_view source · line 37 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @slot:Slot<S, M, V> -> NextView<S, M, V>

template is_current source · line 42 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-same:(@_:V -> @_:V -> Bool) -> @view:CurrentView<S, M, V> -> @value:V -> Bool

template queue source · line 62 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @slot:Slot<S, M, V> -> @value:V -> @skipSame:Bool -> Slot<S, M, V>

template reset source · line 67 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @slot:Slot<S, M, V> -> Slot<S, M, V>

template clear_changed source · line 72 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @slot:Slot<S, M, V> -> Slot<S, M, V>

template snapshot_pending source · line 77 · raw

@-V:Data -> @pending:Pending<V> -> Snapshot<V>

template snapshot source · line 82 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @slot:Slot<S, M, V> -> Snapshot<V>

template apply_decision source · line 87 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @+current:V -> @+value:V -> @previous:Maybe<&2, V> -> @changed:Bool -> @skip:Bool -> Applied<S, M, V>

template apply_present source · line 92 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-same:(@_:V -> @_:V -> Bool) -> @+current:V -> @+value:V -> @previous:Maybe<&2, V> -> @changed:Bool -> @skipSame:Bool -> Applied<S, M, V>

template apply_snapshot source · line 97 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-same:(@_:V -> @_:V -> Bool) -> @slot:Slot<S, M, V> -> @captured:Snapshot<V> -> Applied<S, M, V>

Captured initial value is authoritative; current pending is deleted at the machine's turn, matching Runtime.ts:1534 even when an earlier hook overwrote it.

template write_taken source · line 106 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-W:Type -> @-E:Data -> @-put:(@_:W -> @_:Slot<S, M, V> -> W) -> @pair:Pair(W, Slot<S, M, V>) -> @undo:List<&1, @_:W -> W> -> @commands:List<&1, 0x14a72e1c180a5ab1f8a056d43822425c/deferred_command.Command<W>> -> @events:List<&2, E> -> @trace:0x14a72e1c180a5ab1f8a056d43822425c/trace_facts.State -> @value:V -> @skipSame:Bool -> 0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E>

Journal the complete old slot before replacing it. Aliases see the current world through the same affine transaction; no independent machine owner copy.

template write source · line 113 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-W:Type -> @-E:Data -> @-take:(@_:W -> Pair(W, Slot<S, M, V>)) -> @-put:(@_:W -> @_:Slot<S, M, V> -> W) -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E> -> @value:V -> @skipSame:Bool -> 0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E>

template reset_taken source · line 120 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-W:Type -> @-E:Data -> @-put:(@_:W -> @_:Slot<S, M, V> -> W) -> @pair:Pair(W, Slot<S, M, V>) -> @undo:List<&1, @_:W -> W> -> @commands:List<&1, 0x14a72e1c180a5ab1f8a056d43822425c/deferred_command.Command<W>> -> @events:List<&2, E> -> @trace:0x14a72e1c180a5ab1f8a056d43822425c/trace_facts.State -> 0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E>

template reset_tx source · line 127 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-W:Type -> @-E:Data -> @-take:(@_:W -> Pair(W, Slot<S, M, V>)) -> @-put:(@_:W -> @_:Slot<S, M, V> -> W) -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E> -> 0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E>

template next source · line 134 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-W:Type -> @-E:Data -> @-take:(@_:W -> Pair(W, Slot<S, M, V>)) -> @-put:(@_:W -> @_:Slot<S, M, V> -> W) -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E> -> @request:QueueInput<V> -> 0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E>

template read_taken source · line 141 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-W:Type -> @-E:Data -> @pair:Pair(W, Slot<S, M, V>) -> @undo:List<&1, @_:W -> W> -> @commands:List<&1, 0x14a72e1c180a5ab1f8a056d43822425c/deferred_command.Command<W>> -> @events:List<&2, E> -> @trace:0x14a72e1c180a5ab1f8a056d43822425c/trace_facts.State -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E>, Slot<S, M, V>)

template read source · line 146 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-W:Type -> @-E:Data -> @-take:(@_:W -> Pair(W, Slot<S, M, V>)) -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E>, Slot<S, M, V>)

template read_declared source · line 151 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-W:Type -> @-E:Data -> @-take:(@_:W -> Pair(W, Slot<S, M, V>)) -> @-put:(@_:W -> @_:Slot<S, M, V> -> W) -> @_:Family<S, M, V, W, take, put> -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E>, Slot<S, M, V>)

template next_declared source · line 156 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-W:Type -> @-E:Data -> @-take:(@_:W -> Pair(W, Slot<S, M, V>)) -> @-put:(@_:W -> @_:Slot<S, M, V> -> W) -> @_:Family<S, M, V, W, take, put> -> @tx:0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E> -> @request:QueueInput<V> -> 0x14a72e1c180a5ab1f8a056d43822425c/transaction.Tx<W, E>

template current_matches source · line 169 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-same:(@_:V -> @_:V -> Bool) -> @slot:Slot<S, M, V> -> @value:V -> Bool

template changed source · line 174 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @slot:Slot<S, M, V> -> Bool

template all source · line 181 · raw

@-V:Data -> @items:List<&2, Condition<V>> -> Condition<V>

Arbitrary public variadic combinations become a structural Boolean tree. Empty and/or preserve the primary API identities.

template any source · line 186 · raw

@-V:Data -> @items:List<&2, Condition<V>> -> Condition<V>

template evaluate source · line 191 · raw

@-S:Data -> @-M:Data -> @-V:Data -> @-same:(@_:V -> @_:V -> Bool) -> @condition:Condition<V> -> @+slot:Slot<S, M, V> -> Bool

template marker_steps source · line 205 · raw

@-W:Type -> @steps:List<&1, @_:W -> W> -> @world:W -> W

template run_marker source · line 210 · raw

@-S:Data -> @-W:Type -> @marker:Marker<S, W> -> @world:W -> W

template marker_next source · line 219 · raw

@-W:Type -> @-H:Type -> @next:(@_:H -> @_:W -> Pair(H, W)) -> @pair:Pair(H, W) -> Pair(H, W)

template owned_marker_steps source · line 223 · raw

@-W:Type -> @-H:Type -> @steps:List<&1, @_:H -> @_:W -> Pair(H, W)> -> @owners:H -> @world:W -> Pair(H, W)

template run_owned_marker source · line 228 · raw

@-S:Data -> @-W:Type -> @-H:Type -> @marker:OwnedMarker<S, W, H> -> @owners:H -> @world:W -> Pair(H, W)