def presented_inverse_app

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

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/world.bend as W
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

134# Read the current inverse list in stored order and return the App owner. None
135# denotes an invalid target; Some may contain an empty list. Pending commands are
136# not applied, and this read does not offer direct inverse-list mutation.
137def presented_inverse_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>>,app:presented_Application(~S,~C,~R,~E,~declaration,~render,~Owners,~Rows,~prior,~fold),target:W.Handle<S>) -> presented_Application(~S,~C,~R,~E,~declaration,~render,~Owners,~Rows,~prior,~fold) & Maybe<&2,List<&2,W.Handle<S>>>:
138  match app:
139    case Build.Registered{world,owners,recipe,debug}:inverse_taken(~S,~C,~R,~E,~declaration,~render,~Owners,~Rows,~prior,~fold,owners,recipe,debug,P.read(~T.Tx<World(~S,~C,~R,~E),A.Notice<S,E>>,~S,~P.provide_read(~S,~C,~R,~E,~descriptor(~S,declaration)),T.begin(~World(~S,~C,~R,~E),~A.Notice<S,E>,world),target))

Uses (19)

Used by (1)