def append
import bendvy-ecs-core@0.1.0.4/ordinary_app_relation_failure_reader.bend as OrdinaryAppRelationFailureReaderimport Base
import bendvy-ecs-core@0.1.0.4/ordinary_app_composer.bend as Build
import bendvy-ecs-core@0.1.0.4/ordinary_app_observation_data.bend as DTO
import bendvy-ecs-core@0.1.0.4/ordinary_app_records.bend as Records
import bendvy-ecs-core@0.1.0.4/ordinary_app_recipe.bend as Tree
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/relation_commands.bend as Notice
import bendvy-ecs-core@0.1.0.4/relation_failure_runtime.bend as K
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Fields
72# Append an existing reader owner to an App registration product. Preserve
73# previous observations, add Unit rows and fold this reader's debug fields;
74# appending alone does not run the reader.
75def append(~S:Data,~C:Type,~R:Type,~P:Data,~A:Type,~Error:Data,~Out:Type,~runner:W.World<S,C,R,Notice.Notice<S,P>> -> K.Input<S,Notice.Notice<S,P>,A> -> Sys.Outcome<W.World<S,C,R,Notice.Notice<S,P>>,Error,Out>,~Owners:Type,~Rows:Data,~prior:W.World<S,C,R,Notice.Notice<S,P>> -> W.World<S,C,R,Notice.Notice<S,P>> & DTO.Observation<Rows>,~fold:Owners -> Owners & List<&2,Fields.Fields<S>>,owner:Owner<S,K.Reader<S,C,R,Notice.Notice<S,P>,A,Error,Out,runner>>,value:Build.Registered<S,W.World<S,C,R,Notice.Notice<S,P>>,Owners,Rows,prior,fold>) -> Build.Registered<S,W.World<S,C,R,Notice.Notice<S,P>>,Owners & Owner<S,K.Reader<S,C,R,Notice.Notice<S,P>,A,Error,Out,runner>>,DTO.Product<Rows,Unit>,Tree.observe_pair(~W.World<S,C,R,Notice.Notice<S,P>>,~Rows,~Unit,~prior,~observe(~S,~C,~R,~P)),Records.fold_pair(~S,~Owners,~Owner<S,K.Reader<S,C,R,Notice.Notice<S,P>,A,Error,Out,runner>>,~fold,~fields(~S,~C,~R,~P,~A,~Error,~Out,~runner))>:
76 match value:
77 case Build.Registered{world,owners,_,debug}:Build.appended(~S,~W.World<S,C,R,Notice.Notice<S,P>>,~Owners,~Rows,~prior,~fold,~Owner<S,K.Reader<S,C,R,Notice.Notice<S,P>,A,Error,Out,runner>>,~Unit,~observe(~S,~C,~R,~P),~fields(~S,~C,~R,~P,~A,~Error,~Out,~runner),world,owners,owner,debug)
Uses (18)
Used by (0)
No other definition uses this definition.