def run

bendvy-ecs-core@0.1.0.4 · ordinary_machine_handler_bundle.bend:31

import bendvy-ecs-core@0.1.0.4/ordinary_machine_handler_bundle.bend as OrdinaryMachineHandlerBundle
import Base
import bendvy-ecs-core@0.1.0.4/ordinary_machine_handler_bundle_context.bend as Context
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

31# Execute a complete ordinary transition marker with a registered handler
32# bundle. Checks bundle world and requirements before the structural barrier,
33# then applies the existing exit/transition/enter sequence. Owners return in
34# authored order. Exit/transition failures retain retryable pending transition;
35# enter failure retains committed current state/publication. Earlier successful
36# handler transactions are not rolled back with the entire marker.
37# Detailed contract: docs/parity/handlers.md.
38def run(~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>,~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>,bundle:B.Bundle<S,K,V,Q,C,R,E,runner>,world:W.World<S,C,R,E>) -> MarkerResult<S,K,V,Q,C,R,E,runner>:
39  returned(~S,~K,~V,~Q,~C,~R,~E,~runner,Context.run(~S,~K,~V,~Q,~C,~R,~E,~runner,~unobserved(~S,~C,~R,~E,~V,~runner),~"",~take,~put,~publish,~same,~requirement_same,~has,~frame,declaration,bundle,world,Facts.Off{}))

Uses (16)

Used by (1)