restore_graph_public.bend
bendvy-ecs-core@0.1.0.1 · 62 lines · 0 definitions
1import Base
2import bendvy-ecs-core@0.1.0.1/change_tick.bend as Tick
3import bendvy-ecs-core@0.1.0.1/restore_graph_data.bend as GraphData
4import bendvy-ecs-core@0.1.0.1/restore_graph_validation.bend as Validation
5import bendvy-ecs-core@0.1.0.1/restore_graph_machine.bend as Machine
6import bendvy-ecs-core@0.1.0.1/restore_graph_world.bend as Install
7import bendvy-ecs-core@0.1.0.1/restore_data.bend as R
8import bendvy-ecs-core@0.1.0.1/restore_schema.bend as Schema
9import bendvy-ecs-core@0.1.0.1/restore_public.bend as Basic
10import bendvy-ecs-core@0.1.0.1/restore_prepare.bend as Prepare
11import bendvy-ecs-core@0.1.0.1/restore_apply.bend as Apply
12import bendvy-ecs-core@0.1.0.1/relation_commands.bend as Relation
13import bendvy-ecs-core@0.1.0.1/relation_types.bend as G
14import bendvy-ecs-core@0.1.0.1/relation_failure_reader.bend as Declaration
15import bendvy-ecs-core@0.1.0.1/owner_product.bend as Product
16import bendvy-ecs-core@0.1.0.1/snapshot_data.bend as Snapshot
17import bendvy-ecs-core@0.1.0.1/world.bend as W
18import bendvy-ecs-core@0.1.0.1/decode_data.bend as D
19import bendvy-ecs-core@0.1.0.1/entity_key.bend as Key
20type Owner<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> is Type:
21 Owner{basic:Basic.Owner<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>}
22type Error<Custom:Data> is Data:
23 BasicError{error:R.Error<Custom>}
24 GraphError{error:GraphData.Error}
25type Returned<S:Data,World:Type,Owner:Type,Recovery:Type,Custom:Data> is Type:
26 Restored{world:World,owner:Owner,recovery:Recovery,bindings:List<&2,R.Binding<S>>}
27 Rejected{world:World,owner:Owner,recovery:Recovery,input:GraphData.Snapshot,error:Error<Custom>}
28 MissingBinding{world:World,owner:Owner,recovery:Recovery,saved:Key.Key}
29def owned(~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,basic:Basic.Owner<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>) -> Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>:
30 Owner{basic,relations,machines}
31def rejected_recovery(~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,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>,input:GraphData.Snapshot,error:Error<Custom>,result:State & Recovery) -> Returned<S,W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,Recovery,Custom>:
32 match result:
33 case (state,recovery):Rejected{world,Owner{Basic.Owner{schema,state},relations,machines},recovery,input,error}
34def reject(~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,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,error:Error<Custom>) -> Returned<S,W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,Recovery,Custom>:
35 rejected_recovery(~S,~C,~Resources,~Machines,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,~machineRead,~machineCheck,~machineClear,~machineInstall,schema,relations,machines,world,input,error,takeRecovery(release(state)))
36def finish_recovery(~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,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>,bindings:List<&2,R.Binding<S>>,missing:Maybe<&2,Key.Key>,result:State & Recovery) -> Returned<S,W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,Recovery,Custom>:
37 match missing result:
38 case None{},(state,recovery):Restored{world,Owner{Basic.Owner{schema,state},relations,machines},recovery,bindings}
39 case Some{saved},(state,recovery):MissingBinding{world,Owner{Basic.Owner{schema,state},relations,machines},recovery,saved}
40def finished(~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,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>,bindings:List<&2,R.Binding<S>>,state:State,result:Install.Installed<W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>>) -> Returned<S,W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,Recovery,Custom>:
41 match result:
42 case Install.MissingBinding{world,saved}:finish_recovery(~S,~C,~Resources,~Machines,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,~machineRead,~machineCheck,~machineClear,~machineInstall,schema,relations,machines,world,bindings,Some{saved},takeRecovery(commit(state)))
43 case Install.Installed{world}:finish_recovery(~S,~C,~Resources,~Machines,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,~machineRead,~machineCheck,~machineClear,~machineInstall,schema,relations,machines,world,bindings,None{},takeRecovery(commit(state)))
44def applied(~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,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>,input:GraphData.Snapshot,graph:G.Graph<S>,fields:List<&2,D.Field>,result:Apply.ApplyResult<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E,State,Custom>) -> Returned<S,W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,Recovery,Custom>:
45 match result:
46 case Apply.Refused{world,state,_,error}: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,BasicError{error})
47 case Apply.Applied{world,state,+bindings}:finished(~S,~C,~Resources,~Machines,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,~machineRead,~machineCheck,~machineClear,~machineInstall,schema,relations,machines,bindings,state,Install.install(~S,~C,~Resources,~Machines,~E,~machineClear,~machineInstall,world,graph,fields,bindings))
48def machine_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,+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,graph:G.Graph<S>,fields:List<&2,D.Field>,error:Maybe<&2,GraphData.Error>) -> Returned<S,W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,Recovery,Custom>:
49 match input error:
50 case input Some{error}: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,GraphError{error})
51 case GraphData.Snapshot{+basic,+relationFields,+machineFields} None{}:applied(~S,~C,~Resources,~Machines,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,~machineRead,~machineCheck,~machineClear,~machineInstall,schema,relations,machines,GraphData.Snapshot{basic,relationFields,machineFields},graph,fields,Apply.apply(~S,~Relation.Store<S,C>,~Product.Owner<Resources,Machines>,~E,~State,~Custom,~release,~clear,~insert,~emit,world,R.BendvyReady{state,basic}))
52def 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,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>) -> Returned<S,W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,Recovery,Custom>:
53 match input result:
54 case input GraphData.Rejected{error}: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,GraphError{error})
55 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,schema,relations,machines,world,state,GraphData.Snapshot{basic,relationFields,machineFields},graph,machineFields,Machine.validate(~machineCheck,machineFields))
56def prepared(~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,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>,+input:GraphData.Snapshot,result:R.Prepared<State,Custom>) -> Returned<S,W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,Recovery,Custom>:
57 match input result:
58 case input R.Refused{state,_,error}: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,BasicError{error})
59 case GraphData.Snapshot{Snapshot.Snapshot{+version,+floor,+entities,+resources},+relationFields,+machineFields} R.BendvyReady{state,_}:graph_checked(~S,~C,~Resources,~Machines,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,~machineRead,~machineCheck,~machineClear,~machineInstall,~emit,schema,relations,machines,world,state,GraphData.Snapshot{Snapshot.Snapshot{version,floor,entities,resources},relationFields,machineFields},Validation.validate(~S,relationFields,entities,relations))
60def run(~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,owner:Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,world:W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,+input:GraphData.Snapshot) -> Returned<S,W.World<S,Relation.Store<S,C>,Product.Owner<Resources,Machines>,E>,Owner<S,C,Resources,Machines,E,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery,machineRead,machineCheck,machineClear,machineInstall>,Recovery,Custom>:
61 match owner input:
62 case Owner{Basic.Owner{schema,state},relations,machines} GraphData.Snapshot{+basic,+relationFields,+machineFields}:prepared(~S,~C,~Resources,~Machines,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,~machineRead,~machineCheck,~machineClear,~machineInstall,~emit,schema,relations,machines,world,GraphData.Snapshot{basic,relationFields,machineFields},Prepare.prepare(~State,~Custom,~stage,~release,state,basic))