def inserted

bendvy-ecs-core@0.1.0.4 · ordinary_app_schedules.bend:78

import bendvy-ecs-core@0.1.0.4/ordinary_app_schedules.bend as OrdinaryAppSchedules
import Base
import bendvy-ecs-core@0.1.0.4/ordinary_app_schema.bend as App
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Records
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_schedule.bend as Single
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/schedule_provision.bend as SP

78def inserted(~S:Data,~C:Type,~R:Type,~E:Data,~H:Type,~Rows:Data,~observe:W.World<S,C,R,E> -> W.World<S,C,R,E> & DTO.Observation<Rows>,~fold:H -> H & List<&2,Records.Fields<S>>,+plans:List<&2,Named<S>>,+label:String,+plan:SP.Plan<S>,result:Single.Attachment<App.Application<S,C,R,E,H,Rows,observe,fold>,Single.Application<S,C,R,E,H,Rows,observe,fold>>) -> Insertion<Application<S,C,R,E,H,Rows,observe,fold>,S>:
79  match result:
80    case Single.Invalid{app}:Invalid{Application{app,plans}}
81    case Single.Attached{Single.Application{app,_,_,_,_,_}}:Inserted{Application{app,replace(~S,label,plan,plans)},lookup(~S,label,plans)}

Uses (15)

Used by (1)