ordinary_captures.bend
bendvy-ecs-core@0.1.0.1 · 11 lines · 0 definitions
1import Base
2import bendvy-ecs-core@0.1.0.1/captures.bend as Captures
3import bendvy-ecs-core@0.1.0.1/local.bend as Local
4import bendvy-ecs-core@0.1.0.1/ordinary_app_local_fields.bend as Ord
5import bendvy-ecs-core@0.1.0.1/ordinary_resource_system.bend as P
6import bendvy-ecs-core@0.1.0.1/world.bend as W
7import bendvy-ecs-core@0.1.0.1/transaction.bend as T
8# Ordinary authored body receives declared capabilities and its runtime capture.
9# Registration metadata and transaction completion derive from the declaration.
10def define(~S:Data,~C:Type,~R:Type,~E:Data,~L:Type,~Args:Type,~Error:Data,~Out:Type,~Ops:Type -> Type,~declaration:P.Declaration<S,R,T.Tx<W.World<S,C,R,E>,E>,Ops(T.Tx<W.World<S,C,R,E>,E>)>,~body:@-H:Type -> @-caps:Ops(H) -> L -> Args -> H -> H & (L & (T.Outcome<Error> & Out)),world:W.World<S,C,R,E>,name:String,local:L) -> Local.Registered<S,C,R,E,L,Args,Error,Out,Ord.runner(~S,~C,~R,~E,~L,~Args,~Error,~Out,~Ops,~declaration,~body)>:
11 Captures.register(~S,~C,~R,~E,~L,~Args,~Error,~Out,~Ord.runner(~S,~C,~R,~E,~L,~Args,~Error,~Out,~Ops,~declaration,~body),world,name,P.access(~S,P.clause(~S,~R,~T.Tx<W.World<S,C,R,E>,E>,~Ops(T.Tx<W.World<S,C,R,E>,E>),declaration)),local)