def runner

bendvy-ecs-core@0.1.0.4 · ordinary_resource_field_system.bend:76

import bendvy-ecs-core@0.1.0.4/ordinary_resource_field_system.bend as OrdinaryResourceFieldSystem
import Base
import bendvy-ecs-core@0.1.0.4/ordinary_resource_system.bend as Whole
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/system.bend as Sys
import bendvy-ecs-core@0.1.0.4/transaction.bend as T
import bendvy-ecs-core@0.1.0.4/capabilities.bend as Cap

76# Execute body once with opaque Tx caps from this field declaration and finish
77# the ECS transaction. Failure restores recorded fields, discards Out and suppresses
78# staged work; canonical lenses preserve siblings. No implicit structural barrier.
79def runner(~S:Data,~C:Type,~R:Type,~E:Data,~Ops:Type -> Type,~Args:Type,~Error:Data,~Out:Type,~declaration:Declaration<S,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) -> Args -> H -> H & (T.Outcome<Error> & Out),world:W.World<S,C,R,E>,args:Args) -> Sys.Outcome<W.World<S,C,R,E>,Error,Out>:
80  Whole.finished(~S,~C,~R,~E,~Error,~Out,Cap.invoke_owned(~Ops,~Args,~(T.Outcome<Error> & Out),~body,~T.Tx<W.World<S,C,R,E>,E>,~grant(~S,~T.Tx<W.World<S,C,R,E>,E>,~Ops(T.Tx<W.World<S,C,R,E>,E>),declaration),args,T.begin(~W.World<S,C,R,E>,~E,world)))

Uses (10)

Used by (18)