def execution_dispatch
import bendvy-ecs-core@0.1.0.4/ordinary_app_capture_query.bend as OrdinaryAppCaptureQueryimport Base
import bendvy-ecs-core@0.1.0.4/ordinary_app_execution_recipe.bend as Exec
import bendvy-ecs-core@0.1.0.4/execution_context.bend as Ctx
import bendvy-ecs-core@0.1.0.4/schedule_provision.bend as SP
import bendvy-ecs-core@0.1.0.4/captured_schedule_composition.bend as Choice
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Records
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/compose.bend as Q
import bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend as Decl
import bendvy-ecs-core@0.1.0.4/ordinary_app_observation_data.bend as DTO
99# Advanced App-composition projection: dispatch a registered ID and return all
100# owners/context on success or failure. Prefer App schedule/run in gameplay;
101# use the library-generated registration IDs and reader cursors.
102def execution_dispatch(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World<S,C,R,E> -> W.World<S,C,R,E> & DTO.Observation<Rows>,~fold:Owners -> Owners & List<&2,Records.Fields<S>>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan<S>,~priorDispatch:Owners -> Ctx.Context<W.World<S,C,R,E>> -> U32 -> Owners & Sys.Outcome<Ctx.Context<W.World<S,C,R,E>>,PriorError,Unit>,~priorProvide:W.World<S,C,R,E> -> W.World<S,C,R,E> & List<&2,SP.Requirement<S>>,~L:Type,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~query:Decl.Declaration<S,Q.Frame<S,C,R,E>,Ops(Q.Frame<S,C,R,E>)>,~body:@-H:Type -> @-caps:Ops(H) -> L -> Args -> H -> H & (L & (T.Outcome<Error> & Out))) -> (Owners & Invocation(~S,~C,~R,~E,~L,~Ops,~Args,~Error,~Out,~query,~body)) -> Ctx.Context<W.World<S,C,R,E>> -> U32 -> (Owners & Invocation(~S,~C,~R,~E,~L,~Ops,~Args,~Error,~Out,~query,~body)) & Sys.Outcome<Ctx.Context<W.World<S,C,R,E>>,Choice.Choice<PriorError,ExecutionError<Error>>,Unit>:
103 Exec.dispatch_pair(~S,~W.World<S,C,R,E>,~Owners,~Invocation(~S,~C,~R,~E,~L,~Ops,~Args,~Error,~Out,~query,~body),~PriorError,~ExecutionError<Error>,~fold,~priorDispatch,~execution_run(~S,~C,~R,~E,~L,~Ops,~Args,~Error,~Out,~query,~body))
Uses (19)
Used by (0)
No other definition uses this definition.