def graph_checked
bendvy-ecs-core@0.1.0.4 · restore_graph_runtime_engine.bend:36
import bendvy-ecs-core@0.1.0.4/restore_graph_runtime_engine.bend as RestoreGraphRuntimeEngine
import Base
import bendvy-ecs-core@0.1.0.4/change_tick.bend as Tick
import bendvy-ecs-core@0.1.0.4/restore_graph_data.bend as GraphData
import bendvy-ecs-core@0.1.0.4/restore_graph_machine.bend as Machine
import bendvy-ecs-core@0.1.0.4/restore_data.bend as R
import bendvy-ecs-core@0.1.0.4/restore_schema.bend as Schema
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as Relation
import bendvy-ecs-core@0.1.0.4/relation_failure_reader.bend as Declaration
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/decode_data.bend as D
import bendvy-ecs-core@0.1.0.4/restore_graph_public.bend as Public
36def graph_checked(~S:Data,~C:Type,~Resources:Type,~Machines:Type,~E:Data,~State:Type,~Custom:Data,~stage:State -> R.Position -> D.Field -> State & R.Dispatch<Custom>,~release:State -> State,~clear:Relation.Store<S,C> -> W.Handle<S> -> Relation.Store<S,C> & List<&2,R.Change<S>>,~insert:Relation.Store<S,C> -> Product.Owner<Resources,Machines> -> State -> List<&2,R.Binding<S>> -> Tick.Tick -> (Relation.Store<S,C> & Product.Owner<Resources,Machines>) & State,~Recovery:Type,~commit:State -> State,~takeRecovery:State -> State & Recovery,~machineRead:Machines -> Machines & List<&2,D.Field>,~machineCheck:D.Field -> Machine.Dispatch,~machineClear:Machines -> Machines,~machineInstall:Machines -> List<&2,D.Field> -> Machines,~emit:R.Change<S> -> E,~Extra:Type,~Receipt:Type,~admit:W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E> -> Extra -> W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E> & (Extra & Receipt),extra:Extra,schema:Schema.Schema<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery>,relations:List<&2,Declaration.Declaration<S>>,machines:Machine.Schema<Machines,machineRead,machineCheck,machineClear,machineInstall>,world:W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,state:State,+input:GraphData.Snapshot,result:GraphData.GraphResult<S>) -> Extra & (Maybe<&1,Receipt> & Public.Returned<S,W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,Public.Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,Recovery,Custom>):
37 match input result:
38 case input GraphData.Rejected{error}:kept(~Extra,~Receipt,~(Public.Returned<S,W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,Public.Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,Recovery,Custom>),extra,None{},Public.reject(~S,~C,~Resources,~Machines,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,~machineRead,~machineCheck,~machineClear,~machineInstall,schema,relations,machines,world,state,input,Public.GraphError{error}))
39 case GraphData.Snapshot{+basic,+relationFields,+machineFields} GraphData.Accepted{graph}:machine_checked(~S,~C,~Resources,~Machines,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,~machineRead,~machineCheck,~machineClear,~machineInstall,~emit,~Extra,~Receipt,~admit,extra,schema,relations,machines,world,state,GraphData.Snapshot{basic,relationFields,machineFields},graph,machineFields,Machine.validate(~machineCheck,machineFields))