query_contract.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.2/query_contract.bend as Query_contract
8 imports
import Base import ./change_tick.bend as Tick import ./trace_facts.bend as TraceFacts import entity_key.bend as Key import compose.bend as Q import capabilities.bend as Cap import world.bend as W import transaction.bend as T
Types
type Error source · line 10 · raw
@U:Data -> Data
MissingEntity@U:Data -> @entityId:0xb2b0f04555daca474f0f77d0966945c9/entity_key.Key -> Error<U>
QueryMismatch@U:Data -> @entityId:0xb2b0f04555daca474f0f77d0966945c9/entity_key.Key -> Error<U>
NoEntities@U:Data -> Error<U>
MultipleEntities@U:Data -> @count:U32 -> Error<U>
BodyError@U:Data -> @error:0xb2b0f04555daca474f0f77d0966945c9/compose.Error<U> -> Error<U>
type Scanned source · line 16 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> Type
Scanned@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @handles:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Scanned<S, Store, R, E>
type Executed source · line 18 · raw
@-World:Type -> @U:Data -> @Out:Data -> Type
Executed@-World:Type -> @U:Data -> @Out:Data -> @world:World -> @result:Result<&2, &2, Error<U>, Out> -> Executed<World, U, Out>
Templates
template handle_id source · line 21 · raw
@-S:Data -> @handle:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> 0xb2b0f04555daca474f0f77d0966945c9/entity_key.Key
template add source · line 24 · raw
@-S:Data -> @selected:Bool -> @handle:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @rest:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>>
template unselect source · line 29 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @observed:Pair(0xb2b0f04555daca474f0f77d0966945c9/compose.Frame<S, Store, R, E>, Bool) -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, Bool)
Selection is a read-only observation even if a trusted plan accidentally mutates.
template prepend source · line 32 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @selected:Bool -> @handle:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @observed:Scanned<S, Store, R, E> -> Scanned<S, Store, R, E>
template scanned_join source · line 35 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @+cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> @handle:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @next:(@_:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> Scanned<S, Store, R, E>) -> @observed:Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, Bool) -> Scanned<S, Store, R, E>
template scan_handles source · line 38 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @handles:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> @+cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> Scanned<S, Store, R, E>
template scan_reserved source · line 42 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> @observed:Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>>) -> Scanned<S, Store, R, E>
template scan source · line 45 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> Scanned<S, Store, R, E>
template count_list source · line 47 · raw
@-S:Data -> @handles:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> @n:U32 -> U32
template counted source · line 51 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @observed:Scanned<S, Store, R, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U32)
template count source · line 54 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U32)
template executed source · line 56 · raw
@-World:Type -> @-U:Data -> @-Out:Data -> @+entityId:0xb2b0f04555daca474f0f77d0966945c9/entity_key.Key -> @observed:0xb2b0f04555daca474f0f77d0966945c9/compose.Executed<World, 0xb2b0f04555daca474f0f77d0966945c9/compose.Error<U>, Out> -> Executed<World, U, Out>
template complete source · line 62 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-U:Data -> @-Out:Data -> @tx:0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Tx<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, E>, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<0xb2b0f04555daca474f0f77d0966945c9/compose.Error<U>>, List<&2, Out>))
template scope_finished source · line 64 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-U:Data -> @-Out:Data -> @owned:Bool -> @result:Executed<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U, Out> -> Executed<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U, Out>
template invoke_inner source · line 67 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @-A:Data -> @-U:Data -> @-Out:Data -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:A -> @_:H -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<U>, Out))) -> @args:A -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @+handle:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> Executed<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U, Out>
template invoke_scoped source · line 69 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @-A:Data -> @-U:Data -> @-Out:Data -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:A -> @_:H -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<U>, Out))) -> @args:A -> @admitted:Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, Bool) -> @+handle:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> Executed<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U, Out>
template invoke source · line 72 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @-A:Data -> @-U:Data -> @-Out:Data -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:A -> @_:H -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<U>, Out))) -> @args:A -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @+handle:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> Executed<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U, Out>
template single_scanned source · line 75 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @-A:Data -> @-U:Data -> @-Out:Data -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:A -> @_:H -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<U>, Out))) -> @args:A -> @cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> @observed:Scanned<S, Store, R, E> -> Executed<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U, Out>
template single source · line 80 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @-A:Data -> @-U:Data -> @-Out:Data -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:A -> @_:H -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<U>, Out))) -> @args:A -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @+cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> Executed<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U, Out>
template lookup_selected source · line 82 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @-A:Data -> @-U:Data -> @-Out:Data -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:A -> @_:H -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<U>, Out))) -> @args:A -> @handle:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> @observed:Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, Bool) -> Executed<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U, Out>
template lookup_valid source · line 86 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @-A:Data -> @-U:Data -> @-Out:Data -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:A -> @_:H -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<U>, Out))) -> @args:A -> @+handle:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @+cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> @observed:Pair(0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, Bool) -> Executed<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U, Out>
template get source · line 90 · raw
@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-plan:0xb2b0f04555daca474f0f77d0966945c9/compose.Plan<S, Store, R, E, Ops> -> @-A:Data -> @-U:Data -> @-Out:Data -> @-body:(@-H:Type -> @-caps:Ops(H) -> @_:A -> @_:H -> Pair(H, Pair(0xb2b0f04555daca474f0f77d0966945c9/transaction.Outcome<U>, Out))) -> @args:A -> @world:0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E> -> @+handle:0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S> -> @cursor:Maybe<&2, 0xb2b0f04555daca474f0f77d0966945c9/change_tick.Tick> -> Executed<0xb2b0f04555daca474f0f77d0966945c9/world.World<S, Store, R, E>, U, Out>