def runner

bendvy-ecs-core@0.1.0.4 · ordinary_app_local_fields.bend:31

import bendvy-ecs-core@0.1.0.4/ordinary_app_local_fields.bend as OrdinaryAppLocalFields
import Base
import bendvy-ecs-core@0.1.0.4/local.bend as Local
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/ordinary_resource_system.bend as P
import bendvy-ecs-core@0.1.0.4/transaction.bend as T

31# Execute one resource declaration/body with opaque Tx capabilities and actual L.
32# Finish the ECS transaction using the returned outcome. Body-returned Local
33# persists on success AND failure; failed Out is discarded, not returned as recovery.
34# Args is consumed by the callback. This is Local execution, not captured-query
35# state rollback, and arbitrary external callback effects are not transactional.
36def runner(~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>,local:L,args:Args) -> Local.Outcome<W.World<S,C,R,E>,L,Error,Out>:
37  finished(~S,~C,~R,~E,~L,~Error,~Out,body(T.Tx<W.World<S,C,R,E>,E>,P.grant(~S,~R,~T.Tx<W.World<S,C,R,E>,E>,~Ops(T.Tx<W.World<S,C,R,E>,E>),declaration),local,args,T.begin(~W.World<S,C,R,E>,~E,world)))

Uses (9)

Used by (7)