def invoke

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

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

34def invoke(~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>,~observed:Facts.State -> W.World<S,C,R,E> -> H.Invocation<V> -> Sys.Outcome<W.World<S,C,R,E>,String,Unit> & Facts.State,entry:H.Entry<S,C,R,E,V,runner>,context:Ctx.Context<W.World<S,C,R,E>>,value:H.Phase,from:V,to:V) -> H.Entry<S,C,R,E,V,runner> & Sys.Outcome<Ctx.Context<W.World<S,C,R,E>>,String,Unit>:
35  match value:
36    case H.BendvyExit{}:invoke_kind(~S,~C,~R,~E,~V,~runner,~observed,entry,context,Facts.ExitPhase{},H.BendvyExit{},from,to)
37    case H.Transition{}:invoke_kind(~S,~C,~R,~E,~V,~runner,~observed,entry,context,Facts.TransitionPhase{},H.Transition{},from,to)
38    case H.Enter{}:invoke_kind(~S,~C,~R,~E,~V,~runner,~observed,entry,context,Facts.EnterPhase{},H.Enter{},from,to)

Uses (12)

Used by (5)