def allowed

bendvy-ecs-core@0.1.0.4 · ordinary_machine_handler_bundle_context.bend:104

import bendvy-ecs-core@0.1.0.4/ordinary_machine_handler_bundle_context.bend as OrdinaryMachineHandlerBundleContext
import Base
import bendvy-ecs-core@0.1.0.4/trace_facts.bend as Facts
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/machine.bend as M
import bendvy-ecs-core@0.1.0.4/machine_handlers.bend as H
import bendvy-ecs-core@0.1.0.4/machine_handler_bundle.bend as B
import bendvy-ecs-core@0.1.0.4/ordinary_machine_schedule.bend as Ordinary

104def allowed(~S:Data,~K:Data,~V:Data,~Q:Data,~C:Type,~R:Type,~E: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,~name:String,~take:W.World<S,C,R,E> -> W.World<S,C,R,E> & M.Slot<S,K,V>,~put:W.World<S,C,R,E> -> M.Slot<S,K,V> -> W.World<S,C,R,E>,~publish:W.World<S,C,R,E> -> M.Transition<V> -> W.World<S,C,R,E>,~same:V -> V -> Bool,~requirement_same:Q -> Q -> Bool,~has:W.World<S,C,R,E> -> Q -> W.World<S,C,R,E> & Bool,~frame:W.World<S,C,R,E> -> W.World<S,C,R,E>,+declaration:Ordinary.Declaration<S>,yes:Bool,namespace:U32,entries:List<&1,B.Scheduled<S,K,V,Q,C,R,E,runner>>,world:W.World<S,C,R,E>,trace:Facts.State) -> MarkerResult<S,K,V,Q,C,R,E,runner>:
105  match yes:
106    case False{}:MarkerResult{B.Returned{B.Bundle{namespace,entries},world,B.ForeignBundle{}},[],[],trace}
107    case True{}:gathered(~S,~K,~V,~Q,~C,~R,~E,~runner,~observed,~name,~take,~put,~publish,~same,~requirement_same,~has,~frame,declaration,namespace,world,B.requirements(~S,~K,~V,~Q,~C,~R,~E,~runner,entries),trace)

Uses (20)

Used by (1)