def runner

bendvy-ecs-core@0.1.0.4 · ordinary_lifetime_scope.bend:112

import bendvy-ecs-core@0.1.0.4/ordinary_lifetime_scope.bend as OrdinaryLifetimeScope
import Base
import bendvy-ecs-core@0.1.0.4/lifetime_scope.bend as Sc
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/relation_failure_reader.bend as Rel
import bendvy-ecs-core@0.1.0.4/transaction.bend as T
import bendvy-ecs-core@0.1.0.4/system.bend as Sys

112# Execute one body with lifetime capabilities inside an ordinary transaction.
113# Threads World through transaction finish: success returns Out; failure returns
114# World/error and discards Out, including any affine payload stored only there.
115# Failed staged spawns/cleanup are not published. Successful completion still
116# leaves structural work pending until the caller applies an explicit barrier.
117# Host IO and arbitrary trusted callback effects are not made reversible here.
118def runner(~S:Data,~C:Type,~R:Type,~E:Data,~P:Type,~populate:W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>> -> W.Handle<S> -> P -> W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>>,~clear:C -> W.Handle<S> -> C & List<&2,A.Notice<S,E>>,~record:W.Handle<S> -> A.Notice<S,E>,~declarations:List<&2,Rel.Declaration<S>>,~Args:Type,~Error:Data,~Out:Type,~body:@-H:Type -> @-ops:Ops<H,S,P> -> Args -> H -> H & (T.Outcome<Error> & Out),world:W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>>,args:Args) -> Sys.Outcome<W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>>,Error,Out>:
119  invoked(~S,~C,~R,~E,~Error,~Out,body(T.Tx<W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>>,A.Notice<S,E>>,provide(~S,~C,~R,~E,~P,~populate,~clear,~record,~declarations),args,T.begin(~W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>>,~A.Notice<S,E>,world)))

Uses (15)

Used by (2)