def finished

bendvy-ecs-core@0.1.0.4 · restore_runtime.bend:23

import bendvy-ecs-core@0.1.0.4/restore_runtime.bend as RestoreRuntime
import Base
import bendvy-ecs-core@0.1.0.4/change_tick.bend as Tick
import bendvy-ecs-core@0.1.0.4/restore_public.bend as Public
import bendvy-ecs-core@0.1.0.4/restore_schema.bend as Schema
import bendvy-ecs-core@0.1.0.4/restore_data.bend as R
import bendvy-ecs-core@0.1.0.4/restore_apply.bend as Apply
import bendvy-ecs-core@0.1.0.4/decode_data.bend as D
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/event_family_routing.bend as Route
import bendvy-ecs-core@0.1.0.4/event_family_runtime.bend as Family
import bendvy-ecs-core@0.1.0.4/owned_event_family_catalog.bend as Catalog
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product

23def finished(~S:Data,~C:Type,~User:Type,~Logs:Type,~E:Data,~F:Type,~EventOwners:Type,~Receipt:Type,~State:Type,~Custom:Data,~stage:State -> R.Position -> D.Field -> State & R.Dispatch<Custom>,~release:State -> State,~clear:C -> W.Handle<S> -> C & List<&2,R.Change<S>>,~insert:C -> Product.Owner<User,Logs> -> State -> List<&2,R.Binding<S>> -> Tick.Tick -> (C & Product.Owner<User,Logs>) & State,~emit:R.Change<S> -> E,~retain:Logs -> List<&2,E> -> Logs & Receipt,~drain:Logs -> Logs & Receipt,~clearStreams:F -> F,~catalog:Catalog.Catalog<E,Logs,F,Receipt,retain,drain,clearStreams>,~sync:F -> Nat -> List<&2,E> -> F,~Recovery:Type,~commit:State -> State,~takeRecovery:State -> State & Recovery,schema:Schema.Schema<S,C,Product.Owner<User,Logs>,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery>,family:Family.State<E,F,EventOwners>,tick:Nat,receipt:Receipt,result:Apply.ApplyResult<S,C,Product.Owner<User,Logs>,E,State,Custom>) -> Route.Runtime<S,C,Product.Owner<User,Logs>,E,Family.State<E,F,EventOwners>> & (Public.Owner<S,C,Product.Owner<User,Logs>,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery> & (Public.Outcome<S,Custom> & (Recovery & Maybe<&1,Receipt>))):
24  match result:
25    case Apply.Applied{world,state,bindings}:packed(~S,~C,~User,~Logs,~E,~F,~EventOwners,~Receipt,~State,~Custom,~stage,~release,~clear,~insert,~emit,~retain,~drain,~clearStreams,~catalog,~sync,~Recovery,~commit,~takeRecovery,True{},family,tick,Some{receipt},Public.run_returned(~S,~C,~Product.Owner<User,Logs>,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,schema,Apply.Applied{world,state,bindings}))
26    case Apply.Refused{world,state,input,error}:packed(~S,~C,~User,~Logs,~E,~F,~EventOwners,~Receipt,~State,~Custom,~stage,~release,~clear,~insert,~emit,~retain,~drain,~clearStreams,~catalog,~sync,~Recovery,~commit,~takeRecovery,False{},family,tick,Some{receipt},Public.run_returned(~S,~C,~Product.Owner<User,Logs>,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,schema,Apply.Refused{world,state,input,error}))

Uses (22)

Used by (1)