~/bend-docscommunity

provider.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.1/provider.bend as Provider

7 imports
import Base
import world.bend as W
import column.bend as Col
import component.bend as Cmp
import transaction.bend as T
import resource.bend as Res
import commands.bend as Cmd

Types

type Frame source · line 12 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> Type

Concrete Frame is trusted provisioning. Rank2 gameplay receives arbitrary H. Operations are erased closed templates: repeated gets/sets construct fresh affine operation applications, never duplicate a captured Type closure.

type Error source · line 17 · raw

@U:Data -> Data

Direct-query body failure: UserError retains the authored Data error; AccessError retains a World validation/access error. The enclosing query runner applies its transaction rollback; this value alone performs no undo.

Definitions

def first_error source · line 35 · raw

@previous:Maybe<&2, 0xf435da9e535b3846d643dad16580e35f/world.WorldError> -> @error:0xf435da9e535b3846d643dad16580e35f/world.WorldError -> Maybe<&2, 0xf435da9e535b3846d643dad16580e35f/world.WorldError>

Templates

template read_join source · line 21 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-V:Data -> @+handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @+mainName:String -> @+auxName:String -> @+error:Maybe<&2, 0xf435da9e535b3846d643dad16580e35f/world.WorldError> -> @observed:Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>, E>, 0xf435da9e535b3846d643dad16580e35f/component.Access<V>) -> Pair(Frame<S, Store, R, E>, 0xf435da9e535b3846d643dad16580e35f/component.Access<V>)

template get source · line 25 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Rest:Type -> @-C:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0xf435da9e535b3846d643dad16580e35f/column.Column<S, C>)) -> @-put:(@_:Rest -> @_:0xf435da9e535b3846d643dad16580e35f/column.Column<S, C> -> Store) -> @-project:(@_:C -> Pair(C, V)) -> @frame:Frame<S, Store, R, E> -> Pair(Frame<S, Store, R, E>, 0xf435da9e535b3846d643dad16580e35f/component.Access<V>)

template aux_get source · line 30 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-AuxRest:Type -> @-AuxC:Type -> @-AuxV:Data -> @-AuxToken:Data -> @-aux_take:(@_:Store -> Pair(AuxRest, 0xf435da9e535b3846d643dad16580e35f/column.Column<S, AuxC>)) -> @-aux_put:(@_:AuxRest -> @_:0xf435da9e535b3846d643dad16580e35f/column.Column<S, AuxC> -> Store) -> @-aux_project:(@_:AuxC -> Pair(AuxC, AuxV)) -> @frame:Frame<S, Store, R, E> -> Pair(Frame<S, Store, R, E>, 0xf435da9e535b3846d643dad16580e35f/component.Access<AuxV>)

template written source · line 40 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-C:Type -> @+handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @+mainName:String -> @+auxName:String -> @+error:Maybe<&2, 0xf435da9e535b3846d643dad16580e35f/world.WorldError> -> @result:0xf435da9e535b3846d643dad16580e35f/component.SetResult<0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>, E>, C> -> Frame<S, Store, R, E>

template set source · line 46 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Rest:Type -> @-C:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0xf435da9e535b3846d643dad16580e35f/column.Column<S, C>)) -> @-put:(@_:Rest -> @_:0xf435da9e535b3846d643dad16580e35f/column.Column<S, C> -> Store) -> @-project:(@_:C -> Pair(C, V)) -> @frame:Frame<S, Store, R, E> -> @replacement:C -> Frame<S, Store, R, E>

template resource_join source · line 51 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-RV:Data -> @+handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @+mainName:String -> @+auxName:String -> @+error:Maybe<&2, 0xf435da9e535b3846d643dad16580e35f/world.WorldError> -> @observed:Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>, E>, RV) -> Pair(Frame<S, Store, R, E>, RV)

template resource_get source · line 55 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-RV:Data -> @-resource_project:(@_:R -> Pair(R, RV)) -> @frame:Frame<S, Store, R, E> -> Pair(Frame<S, Store, R, E>, RV)

template resource_set source · line 60 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @frame:Frame<S, Store, R, E> -> @replacement:R -> Frame<S, Store, R, E>

template emit source · line 65 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @frame:Frame<S, Store, R, E> -> @event:E -> Frame<S, Store, R, E>

template despawn_join source · line 70 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @+handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @+mainName:String -> @+auxName:String -> @+error:Maybe<&2, 0xf435da9e535b3846d643dad16580e35f/world.WorldError> -> @observed:Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>, E>, 0xf435da9e535b3846d643dad16580e35f/world.Status) -> Frame<S, Store, R, E>

template despawn source · line 75 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-clear:(@_:Store -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> Store) -> @frame:Frame<S, Store, R, E> -> Frame<S, Store, R, E>

template spawn_join source · line 80 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @+handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @+mainName:String -> @+auxName:String -> @+error:Maybe<&2, 0xf435da9e535b3846d643dad16580e35f/world.WorldError> -> @observed:Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>, E>, 0xf435da9e535b3846d643dad16580e35f/world.Reservation<S>) -> Pair(Frame<S, Store, R, E>, 0xf435da9e535b3846d643dad16580e35f/world.Reservation<S>)

template spawn source · line 85 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Payload:Type -> @-populate:(@_:0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E> -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @_:Payload -> 0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>) -> @frame:Frame<S, Store, R, E> -> @payload:Payload -> Pair(Frame<S, Store, R, E>, 0xf435da9e535b3846d643dad16580e35f/world.Reservation<S>)

template outcome source · line 90 · raw

@-U:Data -> @internal:Maybe<&2, 0xf435da9e535b3846d643dad16580e35f/world.WorldError> -> @user:0xf435da9e535b3846d643dad16580e35f/transaction.Outcome<U> -> 0xf435da9e535b3846d643dad16580e35f/transaction.Outcome<Error<U>>

template returned source · line 96 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-U:Data -> @result:Pair(Frame<S, Store, R, E>, 0xf435da9e535b3846d643dad16580e35f/transaction.Outcome<U>) -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>, E>, 0xf435da9e535b3846d643dad16580e35f/transaction.Outcome<Error<U>>)

template run source · line 100 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Rest:Type -> @-C:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0xf435da9e535b3846d643dad16580e35f/column.Column<S, C>)) -> @-put:(@_:Rest -> @_:0xf435da9e535b3846d643dad16580e35f/column.Column<S, C> -> Store) -> @-project:(@_:C -> Pair(C, V)) -> @-AuxRest:Type -> @-AuxC:Type -> @-AuxV:Data -> @-AuxToken:Data -> @-aux_take:(@_:Store -> Pair(AuxRest, 0xf435da9e535b3846d643dad16580e35f/column.Column<S, AuxC>)) -> @-aux_put:(@_:AuxRest -> @_:0xf435da9e535b3846d643dad16580e35f/column.Column<S, AuxC> -> Store) -> @-aux_project:(@_:AuxC -> Pair(AuxC, AuxV)) -> @-RV:Data -> @-resource_project:(@_:R -> Pair(R, RV)) -> @-Payload:Type -> @-populate:(@_:0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E> -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @_:Payload -> 0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>) -> @-clear:(@_:Store -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> Store) -> @-A:Data -> @-U:Data -> @-body:(@-H:Type -> @-get:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<V>)) -> @-set:(@_:H -> @_:C -> H) -> @-aux:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<AuxV>)) -> @-resource_get:(@_:H -> Pair(H, RV)) -> @-resource_set:(@_:H -> @_:R -> H) -> @-emit:(@_:H -> @_:E -> H) -> @-despawn:(@_:H -> H) -> @-spawn:(@_:H -> @_:Payload -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/world.Reservation<S>)) -> @_:A -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/transaction.Outcome<U>)) -> @+mainName:String -> @+auxName:String -> @tx:0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>, E> -> @+handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @args:A -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>, E>, 0xf435da9e535b3846d643dad16580e35f/transaction.Outcome<Error<U>>)

template read_returned source · line 103 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Out:Data -> @result:Pair(Frame<S, Store, R, E>, Out) -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>, E>, Out)

template read source · line 107 · raw

@-S:Data -> @-Store:Type -> @-R:Type -> @-E:Data -> @-Rest:Type -> @-C:Type -> @-V:Data -> @-Token:Data -> @-take:(@_:Store -> Pair(Rest, 0xf435da9e535b3846d643dad16580e35f/column.Column<S, C>)) -> @-put:(@_:Rest -> @_:0xf435da9e535b3846d643dad16580e35f/column.Column<S, C> -> Store) -> @-project:(@_:C -> Pair(C, V)) -> @-AuxRest:Type -> @-AuxC:Type -> @-AuxV:Data -> @-AuxToken:Data -> @-aux_take:(@_:Store -> Pair(AuxRest, 0xf435da9e535b3846d643dad16580e35f/column.Column<S, AuxC>)) -> @-aux_put:(@_:AuxRest -> @_:0xf435da9e535b3846d643dad16580e35f/column.Column<S, AuxC> -> Store) -> @-aux_project:(@_:AuxC -> Pair(AuxC, AuxV)) -> @-RV:Data -> @-resource_project:(@_:R -> Pair(R, RV)) -> @-Payload:Type -> @-populate:(@_:0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E> -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @_:Payload -> 0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>) -> @-clear:(@_:Store -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> Store) -> @-A:Data -> @-Out:Data -> @-body:(@-H:Type -> @-get:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<V>)) -> @-aux:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<AuxV>)) -> @-resource_get:(@_:H -> Pair(H, RV)) -> @_:A -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @_:H -> Pair(H, Out)) -> @+mainName:String -> @+auxName:String -> @tx:0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>, E> -> @+handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @args:A -> Pair(0xf435da9e535b3846d643dad16580e35f/transaction.Tx<0xf435da9e535b3846d643dad16580e35f/world.World<S, Store, R, E>, E>, Out)

template component_body source · line 112 · raw

@-S:Data -> @-C:Type -> @-V:Data -> @-AuxV:Data -> @-RV:Data -> @-R:Type -> @-E:Data -> @-Payload:Type -> @-A:Data -> @-U:Data -> @-body:(@-H:Type -> @-get:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<V>)) -> @-set:(@_:H -> @_:C -> H) -> @-aux:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<AuxV>)) -> @-resource_get:(@_:H -> Pair(H, RV)) -> @_:A -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/transaction.Outcome<U>)) -> @-H:Type -> @-get:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<V>)) -> @-set:(@_:H -> @_:C -> H) -> @-aux:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<AuxV>)) -> @-resource_get:(@_:H -> Pair(H, RV)) -> @-resource_set:(@_:H -> @_:R -> H) -> @-emit:(@_:H -> @_:E -> H) -> @-despawn:(@_:H -> H) -> @-spawn:(@_:H -> @_:Payload -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/world.Reservation<S>)) -> @args:A -> @handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @ctx:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/transaction.Outcome<U>)

Restricted grant bundle: no resource replacement, event publication, spawn or despawn operation is handed to the universally quantified user callback.

template event_body source · line 116 · raw

@-S:Data -> @-C:Type -> @-V:Data -> @-AuxV:Data -> @-RV:Data -> @-R:Type -> @-E:Data -> @-Payload:Type -> @-A:Data -> @-U:Data -> @-body:(@-H:Type -> @-get:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<V>)) -> @-set:(@_:H -> @_:C -> H) -> @-aux:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<AuxV>)) -> @-emit:(@_:H -> @_:E -> H) -> @-despawn:(@_:H -> H) -> @_:A -> @_:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/transaction.Outcome<U>)) -> @-H:Type -> @-get:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<V>)) -> @-set:(@_:H -> @_:C -> H) -> @-aux:(@_:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/component.Access<AuxV>)) -> @-resource_get:(@_:H -> Pair(H, RV)) -> @-resource_set:(@_:H -> @_:R -> H) -> @-emit:(@_:H -> @_:E -> H) -> @-despawn:(@_:H -> H) -> @-spawn:(@_:H -> @_:Payload -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/world.Reservation<S>)) -> @args:A -> @handle:0xf435da9e535b3846d643dad16580e35f/world.Handle<S> -> @ctx:H -> Pair(H, 0xf435da9e535b3846d643dad16580e35f/transaction.Outcome<U>)

Main RW + aux Read + event Write + current-entity Despawn only.