def register

bendvy-ecs-core@0.1.0.4 · ordinary_app_local_fields.bend:91

import bendvy-ecs-core@0.1.0.4/ordinary_app_local_fields.bend as OrdinaryAppLocalFields
import 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_records.bend as Pair
import bendvy-ecs-core@0.1.0.4/ordinary_app_observation_data.bend as DTO
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Fields
import bendvy-ecs-core@0.1.0.4/ordinary_resource_system.bend as P
import bendvy-ecs-core@0.1.0.4/transaction.bend as T

91# Register into a composer App, deriving the metadata fold and retaining prior
92# owners/observer/debug. On refusal return prior App shape and Local; does not run
93# body. See test-fixtures/public-schedules/named-app-v1/matched-feature-v1/fixture.bend.
94def register(~S:Data,~C:Type,~R:Type,~E:Data,~L:Type,~Args:Type,~Error:Data,~Out:Type,~Ops:Type -> Type,~declaration:P.Declaration<S,R,T.Tx<W.World<S,C,R,E>,E>,Ops(T.Tx<W.World<S,C,R,E>,E>)>,~body:@-H:Type -> @-caps:Ops(H) -> L -> Args -> H -> H & (L & (T.Outcome<Error> & Out)),~Previous:Type,~Rows:Data,~observe:W.World<S,C,R,E> -> W.World<S,C,R,E> & DTO.Observation<Rows>,~previousFold:Previous -> Previous & List<&2,Fields.Fields<S>>,app:Build.Registered<S,W.World<S,C,R,E>,Previous,Rows,observe,previousFold>,name:String,local:L) -> Appended<Build.Registered<S,W.World<S,C,R,E>,Previous,Rows,observe,previousFold>,Build.Registered<S,W.World<S,C,R,E>,Previous & Owner<S,C,R,E,L,Args,Error,Out,Ops,declaration,body>,Rows,observe,Pair.fold_pair(~S,~Previous,~Owner<S,C,R,E,L,Args,Error,Out,Ops,declaration,body>,~previousFold,~fold(~S,~C,~R,~E,~L,~Args,~Error,~Out,~Ops,~declaration,~body))>,L>:
95  match app:
96    case Build.Registered{world,previous,recipe,debug}:appended(~S,~C,~R,~E,~L,~Args,~Error,~Out,~Ops,~declaration,~body,~Previous,~Rows,~observe,~previousFold,previous,recipe,debug,define(~S,~C,~R,~E,~L,~Args,~Error,~Out,~Ops,~declaration,~body,world,name,local))

Uses (16)

Used by (0)

No other definition uses this definition.