def presented_relate_app

bendvy-ecs-core@0.1.0.4 · ordinary_app_relation.bend:115

import bendvy-ecs-core@0.1.0.4/ordinary_app_relation.bend as OrdinaryAppRelation
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_observation_data.bend as DTO
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Fields
import bendvy-ecs-core@0.1.0.4/relation_failure_reader.bend as Ord
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/relation_providers.bend as P
import bendvy-ecs-core@0.1.0.4/transaction.bend as T

115# Stage source-to-target replacement under this declaration, then finish the
116# transaction with the supplied outcome. Return the App, queue status and outcome
117# separately: Queued is not barrier application success. Failure discards staged
118# commands; barrier-time structural rejection is reported through relation notices.
119def presented_relate_app(~S:Data,~C:Type,~R:Type,~E:Data,~declaration:Ord.Declaration<S>,~render:Row(~S) -> String,~Owners:Type,~Rows:Data,~prior:World(~S,~C,~R,~E) -> World(~S,~C,~R,~E) & DTO.Observation<Rows>,~fold:Owners -> Owners & List<&2,Fields.Fields<S>>,~Error:Data,app:presented_Application(~S,~C,~R,~E,~declaration,~render,~Owners,~Rows,~prior,~fold),targets:P.Targets<S>,outcome:T.Outcome<Error>) -> presented_Application(~S,~C,~R,~E,~declaration,~render,~Owners,~Rows,~prior,~fold) & DTO.Product<A.QueueStatus,T.Outcome<Error>>:
120  match app:
121    case Build.Registered{world,owners,recipe,debug}:queued(~S,~C,~R,~E,~declaration,~render,~Owners,~Rows,~prior,~fold,~Error,owners,recipe,debug,outcome,P.relate(~T.Tx<World(~S,~C,~R,~E),A.Notice<S,E>>,~S,~P.provide_write(~S,~C,~R,~E,~descriptor(~S,declaration)),T.begin(~World(~S,~C,~R,~E),~A.Notice<S,E>,world),targets))

Uses (21)

Used by (1)