def presented_snapshot_app

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

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_recipe.bend as Tree
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

102# Set observation enablement from flag, then snapshot through the installed recipe.
103# Returns the App in both cases; disabled observation returns None.
104def presented_snapshot_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),flag:Bool) -> presented_Application(~S,~C,~R,~E,~declaration,~render,~Owners,~Rows,~prior,~fold) & Maybe<&2,DTO.Product<List<&2,DTO.Binding<S>>,DTO.Observation<ObservedRows(~S,~Rows)>>>:
105  Build.snapshot(~S,~World(~S,~C,~R,~E),~Owners,~ObservedRows(~S,~Rows),~Tree.observe_pair(~World(~S,~C,~R,~E),~Rows,~View<S>,~prior,~observe(~S,~C,~R,~E,~declaration,~render)),~fold,Build.enabled(~S,~World(~S,~C,~R,~E),~Owners,~ObservedRows(~S,~Rows),~Tree.observe_pair(~World(~S,~C,~R,~E),~Rows,~View<S>,~prior,~observe(~S,~C,~R,~E,~declaration,~render)),~fold,app,flag))

Uses (19)

Used by (1)