import Base import ../change_tick.bend as Tick import ../ordinary_app_execution_recipe.bend as Exec import ../ordinary_app_execution_run.bend as ExecuteRun import ../ordinary_app_registration_run.bend as Transport import ../execution_context.bend as Ctx import ../schedule_provision.bend as SP import ../captured_schedule_composition.bend as Choice import ../ordinary_app_composer.bend as Build import ../ordinary_app_registration_fields.bend as Records import ../ordinary_app_records.bend as Leaf import ../ordinary_app_recipe.bend as Tree import ../ordinary_app_observation.bend as Leaves import ../world.bend as W import ../system.bend as Sys import ../transaction.bend as T import ../ordinary_system.bend as System import ../compose.bend as Q import ../inspector.bend as I import ../inspector_query.bend as IQ import ../ordinary_query_observable.bend as O import ../ordinary_app_observation_data.bend as DTO def extracted(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~render:Value -> String,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~Output:Type,done:Build.Registered,Owners & Leaf.Record,Q.Error,List<&2,Out>,runner>>>,DTO.Product>>>,Tree.observe_pair(~W.World,~Rows,~DTO.Product>>,~observe,~Leaves.component_observe(~S,~C,~R,~E,~Ops,~Value,~query,~render)),Leaf.fold_pair(~S,~Owners,~Leaf.Record,Q.Error,List<&2,Out>,runner>>>,~fold,~Leaf.observed(~S,~Records.Token,Q.Error,List<&2,Out>,runner>>))> -> Output,failed:Build.Registered,Owners,Rows,observe,fold> -> Output,world:W.World,owners:Owners,debug:Bool,result:Records.Token,Q.Error,List<&2,Out>,runner>> & Records.Fields) -> Output: match result: case (token,fields):done(Build.appended(~S,~W.World,~Owners,~Rows,~observe,~fold,~Leaf.Record,Q.Error,List<&2,Out>,runner>>>,~DTO.Product>>,~Leaves.component_observe(~S,~C,~R,~E,~Ops,~Value,~query,~render),~Leaf.observed(~S,~Records.Token,Q.Error,List<&2,Out>,runner>>),world,owners,Leaf.Record{token,fields},debug)) def defined(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~render:Value -> String,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~Output:Type,done:Build.Registered,Owners & Leaf.Record,Q.Error,List<&2,Out>,runner>>>,DTO.Product>>>,Tree.observe_pair(~W.World,~Rows,~DTO.Product>>,~observe,~Leaves.component_observe(~S,~C,~R,~E,~Ops,~Value,~query,~render)),Leaf.fold_pair(~S,~Owners,~Leaf.Record,Q.Error,List<&2,Out>,runner>>>,~fold,~Leaf.observed(~S,~Records.Token,Q.Error,List<&2,Out>,runner>>))> -> Output,failed:Build.Registered,Owners,Rows,observe,fold> -> Output,owners:Owners,recipe:Tree.Recipe,Rows,observe>,debug:Bool,result:System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>) -> Output: match result: case System.Rejected{world}:failed(Build.Registered{world,owners,recipe,debug}) case System.Defined{world,owner}:extracted(~S,~C,~R,~E,~Owners,~Rows,~observe,~fold,~Ops,~Args,~Error,~Out,~Value,~query,~render,~body,~runner,~define_runner,~execute_runner,~ExecError,~callback_failure,~registration_refused,~Output,done,failed,world,owners,debug,Records.component(~S,~C,~R,~E,~(Args & Maybe<&2,Tick.Tick>),~Q.Error,~List<&2,Out>,~runner,owner)) def register(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~render:Value -> String,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~Output:Type,done:Build.Registered,Owners & Leaf.Record,Q.Error,List<&2,Out>,runner>>>,DTO.Product>>>,Tree.observe_pair(~W.World,~Rows,~DTO.Product>>,~observe,~Leaves.component_observe(~S,~C,~R,~E,~Ops,~Value,~query,~render)),Leaf.fold_pair(~S,~Owners,~Leaf.Record,Q.Error,List<&2,Out>,runner>>>,~fold,~Leaf.observed(~S,~Records.Token,Q.Error,List<&2,Out>,runner>>))> -> Output,failed:Build.Registered,Owners,Rows,observe,fold> -> Output,app:Build.Registered,Owners,Rows,observe,fold>,name:String,slot:String) -> Output: match app: case Build.Registered{world,owners,recipe,debug}:defined(~S,~C,~R,~E,~Owners,~Rows,~observe,~fold,~Ops,~Args,~Error,~Out,~Value,~query,~render,~body,~runner,~define_runner,~execute_runner,~ExecError,~callback_failure,~registration_refused,~Output,done,failed,owners,recipe,debug,define_runner(world,name,slot)) def execution_returned(~S:Data,~C:Type,~R:Type,~E:Data,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,+args:Args,result:Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>) -> Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out> & Sys.Outcome>,ExecError,Unit>: match result: case Transport.Completed{token,fields,Sys.Succeeded{world,outputs}}:(Exec.Invocation{Leaf.Record{token,fields},args,outputs},Sys.Succeeded{world,Unit{}}) case Transport.Completed{token,fields,Sys.Failed{world,error}}:(Exec.Invocation{Leaf.Record{token,fields},args,[]},Sys.Failed{world,callback_failure(error)}) case Transport.RegistrationRejected{token,fields,world,_}:(Exec.Invocation{Leaf.Record{token,fields},args,[]},Sys.Failed{world,registration_refused}) def execution_allowed(~S:Data,~C:Type,~R:Type,~E:Data,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,allowed:Bool,owner:Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>,world:Ctx.Context>,id:U32) -> Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out> & Sys.Outcome>,ExecError,Unit>: match allowed owner: case False{} owner:(owner,Sys.Failed{world,registration_refused}) case True{} Exec.Invocation{Leaf.Record{token,fields},+args,_}:execution_returned(~S,~C,~R,~E,~Ops,~Args,~Error,~Out,~Value,~query,~body,~runner,~define_runner,~execute_runner,~ExecError,~callback_failure,~registration_refused,args,execute_runner(token,fields,world,args)) def execution_run(~S:Data,~C:Type,~R:Type,~E:Data,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,owner:Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>,world:Ctx.Context>,id:U32) -> Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out> & Sys.Outcome>,ExecError,Unit>: match owner: case Exec.Invocation{Leaf.Record{token,+fields},args,outputs}: +selected=id execution_allowed(~S,~C,~R,~E,~Ops,~Args,~Error,~Out,~Value,~query,~body,~runner,~define_runner,~execute_runner,~ExecError,~callback_failure,~registration_refused,U32.is_eq(selected,Exec.registration_id(~S,fields)),Exec.Invocation{Leaf.Record{token,fields},args,outputs},world,selected) def Application(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan,~priorDispatch:Owners -> Ctx.Context> -> U32 -> Owners & Sys.Outcome>,PriorError,Unit>,~priorProvide:W.World -> W.World & List<&2,SP.Requirement>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~render:Value -> String) -> Type: Exec.Registered,Owners & Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>,DTO.Product>>>,Tree.observe_pair(~W.World,~Rows,~DTO.Product>>,~observe,~Leaves.component_observe(~S,~C,~R,~E,~Ops,~Value,~query,~render)),Leaf.fold_pair(~S,~Owners,~Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>,~fold,~Exec.invocation_fields(~S,~Records.Token,Q.Error,List<&2,Out>,runner>>,~Args,~Out)),Choice.Choice,Exec.plan_pair(~S,~Owners,~Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>,~priorPlan,~Exec.invocation_plan(~S,~Records.Token,Q.Error,List<&2,Out>,runner>>,~Args,~Out)),Exec.dispatch_pair(~S,~W.World,~Owners,~Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>,~PriorError,~ExecError,~fold,~priorDispatch,~execution_run(~S,~C,~R,~E,~Ops,~Args,~Error,~Out,~Value,~query,~body,~runner,~define_runner,~execute_runner,~ExecError,~callback_failure,~registration_refused)),Exec.provision_pair(~S,~W.World,~priorProvide,~Exec.empty_provide(~S,~W.World))> def execution_added(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan,~priorDispatch:Owners -> Ctx.Context> -> U32 -> Owners & Sys.Outcome>,PriorError,Unit>,~priorProvide:W.World -> W.World & List<&2,SP.Requirement>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~render:Value -> String,~Output:Type,args:Args,done:Application(~S,~C,~R,~E,~Owners,~Rows,~observe,~fold,~PriorError,~priorPlan,~priorDispatch,~priorProvide,~Ops,~Args,~Error,~Out,~Value,~query,~body,~runner,~define_runner,~execute_runner,~ExecError,~callback_failure,~registration_refused,~render) -> Output,result:Build.Registered,Owners & Leaf.Record,Q.Error,List<&2,Out>,runner>>>,DTO.Product>>>,Tree.observe_pair(~W.World,~Rows,~DTO.Product>>,~observe,~Leaves.component_observe(~S,~C,~R,~E,~Ops,~Value,~query,~render)),Leaf.fold_pair(~S,~Owners,~Leaf.Record,Q.Error,List<&2,Out>,runner>>>,~fold,~Leaf.observed(~S,~Records.Token,Q.Error,List<&2,Out>,runner>>))>) -> Output: match result: case Build.Registered{world,(owners,record),recipe,debug}:done(Exec.Registered{Build.Registered{world,(owners,Exec.Invocation{record,args,[]}),recipe,debug},Exec.Recipe{}}) def execution_rejected(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan,~priorDispatch:Owners -> Ctx.Context> -> U32 -> Owners & Sys.Outcome>,PriorError,Unit>,~priorProvide:W.World -> W.World & List<&2,SP.Requirement>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~render:Value -> String,~Output:Type,failed:Exec.Registered,Owners,Rows,observe,fold,PriorError,priorPlan,priorDispatch,priorProvide> -> Output,result:Build.Registered,Owners,Rows,observe,fold>) -> Output: failed(Exec.Registered{result,Exec.Recipe{}}) def add(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan,~priorDispatch:Owners -> Ctx.Context> -> U32 -> Owners & Sys.Outcome>,PriorError,Unit>,~priorProvide:W.World -> W.World & List<&2,SP.Requirement>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~render:Value -> String,~Output:Type,done:Application(~S,~C,~R,~E,~Owners,~Rows,~observe,~fold,~PriorError,~priorPlan,~priorDispatch,~priorProvide,~Ops,~Args,~Error,~Out,~Value,~query,~body,~runner,~define_runner,~execute_runner,~ExecError,~callback_failure,~registration_refused,~render) -> Output,failed:Exec.Registered,Owners,Rows,observe,fold,PriorError,priorPlan,priorDispatch,priorProvide> -> Output,value:Exec.Registered,Owners,Rows,observe,fold,PriorError,priorPlan,priorDispatch,priorProvide>,args:Args,name:String,slot:String) -> Output: match value: case Exec.Registered{app,_}:register(~S,~C,~R,~E,~Owners,~Rows,~observe,~fold,~Ops,~Args,~Error,~Out,~Value,~query,~render,~body,~runner,~define_runner,~execute_runner,~ExecError,~callback_failure,~registration_refused,~Output,execution_added(~S,~C,~R,~E,~Owners,~Rows,~observe,~fold,~PriorError,~priorPlan,~priorDispatch,~priorProvide,~Ops,~Args,~Error,~Out,~Value,~query,~body,~runner,~define_runner,~execute_runner,~ExecError,~callback_failure,~registration_refused,~render,~Output,args,done),execution_rejected(~S,~C,~R,~E,~Owners,~Rows,~observe,~fold,~PriorError,~priorPlan,~priorDispatch,~priorProvide,~Ops,~Args,~Error,~Out,~Value,~query,~body,~runner,~define_runner,~execute_runner,~ExecError,~callback_failure,~registration_refused,~render,~Output,failed),app,name,slot) def execution_owners(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan,~priorDispatch:Owners -> Ctx.Context> -> U32 -> Owners & Sys.Outcome>,PriorError,Unit>,~priorProvide:W.World -> W.World & List<&2,SP.Requirement>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~render:Value -> String) -> Type: Owners & Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out> def execution_rows(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan,~priorDispatch:Owners -> Ctx.Context> -> U32 -> Owners & Sys.Outcome>,PriorError,Unit>,~priorProvide:W.World -> W.World & List<&2,SP.Requirement>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~render:Value -> String) -> Data: DTO.Product>>> def execution_observe(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan,~priorDispatch:Owners -> Ctx.Context> -> U32 -> Owners & Sys.Outcome>,PriorError,Unit>,~priorProvide:W.World -> W.World & List<&2,SP.Requirement>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~render:Value -> String) -> W.World -> W.World & DTO.Observation>>>>: Tree.observe_pair(~W.World,~Rows,~DTO.Product>>,~observe,~Leaves.component_observe(~S,~C,~R,~E,~Ops,~Value,~query,~render)) def execution_fold(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan,~priorDispatch:Owners -> Ctx.Context> -> U32 -> Owners & Sys.Outcome>,PriorError,Unit>,~priorProvide:W.World -> W.World & List<&2,SP.Requirement>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~render:Value -> String) -> (Owners & Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>) -> (Owners & Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>) & List<&2,Records.Fields>: Leaf.fold_pair(~S,~Owners,~Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>,~fold,~Exec.invocation_fields(~S,~Records.Token,Q.Error,List<&2,Out>,runner>>,~Args,~Out)) def execution_plan(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan,~priorDispatch:Owners -> Ctx.Context> -> U32 -> Owners & Sys.Outcome>,PriorError,Unit>,~priorProvide:W.World -> W.World & List<&2,SP.Requirement>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~render:Value -> String) -> (Owners & Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>) -> (Owners & Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>) & SP.Plan: Exec.plan_pair(~S,~Owners,~Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>,~priorPlan,~Exec.invocation_plan(~S,~Records.Token,Q.Error,List<&2,Out>,runner>>,~Args,~Out)) def execution_dispatch(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan,~priorDispatch:Owners -> Ctx.Context> -> U32 -> Owners & Sys.Outcome>,PriorError,Unit>,~priorProvide:W.World -> W.World & List<&2,SP.Requirement>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~render:Value -> String) -> (Owners & Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>) -> Ctx.Context> -> U32 -> (Owners & Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>) & Sys.Outcome>,Choice.Choice,Unit>: Exec.dispatch_pair(~S,~W.World,~Owners,~Exec.Invocation,Q.Error,List<&2,Out>,runner>>,Args,Out>,~PriorError,~ExecError,~fold,~priorDispatch,~execution_run(~S,~C,~R,~E,~Ops,~Args,~Error,~Out,~Value,~query,~body,~runner,~define_runner,~execute_runner,~ExecError,~callback_failure,~registration_refused)) def execution_provide(~S:Data,~C:Type,~R:Type,~E:Data,~Owners:Type,~Rows:Data,~observe:W.World -> W.World & DTO.Observation,~fold:Owners -> Owners & List<&2,Records.Fields>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan,~priorDispatch:Owners -> Ctx.Context> -> U32 -> Owners & Sys.Outcome>,PriorError,Unit>,~priorProvide:W.World -> W.World & List<&2,SP.Requirement>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration,Ops(Q.Frame),I.Frame,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome & Out),~runner:W.World -> (Args & Maybe<&2,Tick.Tick>) -> Sys.Outcome,Q.Error,List<&2,Out>>,~define_runner:W.World -> String -> String -> System.Defined,Sys.Registry,Q.Error,List<&2,Out>,runner>>,~execute_runner:Records.Token,Q.Error,List<&2,Out>,runner>> -> Records.Fields -> Ctx.Context> -> Args -> Transport.TransportResult>,Args & Maybe<&2,Tick.Tick>,Q.Error,List<&2,Out>,Records.Token,Q.Error,List<&2,Out>,runner>>>,~ExecError:Data,~callback_failure:Q.Error -> ExecError,~registration_refused:ExecError,~render:Value -> String) -> W.World -> W.World & List<&2,SP.Requirement>: Exec.provision_pair(~S,~W.World,~priorProvide,~Exec.empty_provide(~S,~W.World))