def add

bendvy-ecs-core@0.1.0.4 · ordinary_app_component.bend:66

import bendvy-ecs-core@0.1.0.4/ordinary_app_component.bend as OrdinaryAppComponent
import Base
import bendvy-ecs-core@0.1.0.4/ordinary_app_execution_recipe.bend as Exec
import bendvy-ecs-core@0.1.0.4/ordinary_app_execution_run.bend as ExecuteRun
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/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/ordinary_system.bend as System
import bendvy-ecs-core@0.1.0.4/compose.bend as Q
import bendvy-ecs-core@0.1.0.4/inspector.bend as I
import bendvy-ecs-core@0.1.0.4/ordinary_query_observable.bend as O
import bendvy-ecs-core@0.1.0.4/ordinary_app_observation_data.bend as DTO
import bendvy-ecs-core@0.1.0.4/internal/ordinary_component_runner.bend as Generic

66# Register a reusable component-query system and derive its execution recipe.
67# query supplies operational access and inspection; body sees only Ops(H).
68# Consumes value; done receives the extended application, while failed receives
69# the original application shape with its world and prior owners retained.
70# Registration does not execute body. Data args are stored for repeated runs;
71# affine captures use ordinary-app-capture-query instead. name/slot identify
72# the registration; schema and query owner types must agree.
73# Example: examples/scheduled-health/registration.bend, create().
74def add(~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>>,~Ops:Type -> Type,~Args:Data,~Error:Data,~Out:Data,~Value:Data,~query:O.Declaration<S,Q.Frame<S,C,R,E>,Ops(Q.Frame<S,C,R,E>),I.Frame<S,C,R,E>,Value>,~body:@-H:Type -> @-caps:Ops(H) -> Args -> H -> H & (T.Outcome<Error> & Out),~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,~render) -> Output,failed:Exec.Registered<S,W.World<S,C,R,E>,Owners,Rows,observe,fold,PriorError,priorPlan,priorDispatch,priorProvide> -> Output,value:Exec.Registered<S,W.World<S,C,R,E>,Owners,Rows,observe,fold,PriorError,priorPlan,priorDispatch,priorProvide>,args:Args,name:String,slot:String) -> Output:
75  Generic.add(~S,~C,~R,~E,~Owners,~Rows,~observe,~fold,~PriorError,~priorPlan,~priorDispatch,~priorProvide,~Ops,~Args,~Error,~Out,~Value,~query,~body,~System.observable_runner(~S,~C,~R,~E,~Ops,~Args,~Error,~Out,~Value,~query,~body),~System.observable_define(~S,~C,~R,~E,~Ops,~Args,~Error,~Out,~Value,~query,~body),~ExecuteRun.component(~S,~C,~R,~E,~Ops,~Args,~Error,~Out,~Value,~query,~body),~ExecutionError<Error>,~callback_failure(~Error),~RegistrationRefused{},~render,~Output,done,failed,value,args,name,slot)

Uses (24)

Used by (0)

No other definition uses this definition.