def outcome

bendvy-ecs-core@0.1.0.4 · machine_handler_context.bend:20

import bendvy-ecs-core@0.1.0.4/machine_handler_context.bend as MachineHandlerContext
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/system.bend as Sys
import bendvy-ecs-core@0.1.0.4/execution_context.bend as Ctx
import bendvy-ecs-core@0.1.0.4/trace_facts.bend as Facts
import bendvy-ecs-core@0.1.0.4/machine_handlers.bend as H

20def outcome(~S:Data,~C:Type,~R:Type,~E:Data,~V:Data,~runner:W.World<S,C,R,E> -> H.Invocation<V> -> Sys.Outcome<W.World<S,C,R,E>,String,Unit>,+ordinal:U32,phase:Facts.HandlerPhase,registry:Sys.Registry<S,C,R,E,H.Invocation<V>,String,Unit,runner>,trace:Facts.State,result:Sys.Outcome<W.World<S,C,R,E>,String,Unit>) -> H.Entry<S,C,R,E,V,runner> & Sys.Outcome<Ctx.Context<W.World<S,C,R,E>>,String,Unit>:
21  match registry result:
22    case Sys.Registry{+namespace,+id,+name,access,cursor} Sys.Succeeded{world,output}:(H.Entry{ordinal,Sys.Registry{namespace,id,name,access,cursor}},Sys.Succeeded{Ctx.Context{world,record(trace,namespace,id,name,ordinal,phase,Facts.Applied{})},output})
23    case Sys.Registry{+namespace,+id,+name,access,cursor} Sys.Failed{world,+error}:(H.Entry{ordinal,Sys.Registry{namespace,id,name,access,cursor}},Sys.Failed{Ctx.Context{world,record(trace,namespace,id,name,ordinal,phase,Facts.Refused{error})},error})

Uses (15)

Used by (1)