def runner

bendvy-ecs-core@0.1.0.4 · ordinary_service_declaration.bend:98

import bendvy-ecs-core@0.1.0.4/ordinary_service_declaration.bend as OrdinaryServiceDeclaration
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

98# Registered service runner: if Ready, call consumes/returns actual P once and is
99# put back; Missing is a successful no-op here. Schedule preflight is separate.
100# No Tx journal, host exception recovery or rollback of external effects is added.
101def runner(~S:Data,~C:Type,~R:Type,~E:Data,~P:Type,~Rest:Type,~take:R -> Rest & Slot<P>,~put:Rest -> Slot<P> -> R,~call:P -> P,~declaration:Declaration<S,R,P,Rest,take,put,call>,world:W.World<S,C,R,E>,_:Unit) -> Sys.Outcome<W.World<S,C,R,E>,Unit,Unit>:
102  match world:
103    case W.World{+ns,allocator,store,resource,+events,pending,+registrations,+nextSystem,+clock}:Sys.Succeeded{W.World{ns,allocator,store,slot_called(~R,~P,~Rest,~put,~call,take(resource)),events,pending,registrations,nextSystem,clock},Unit{}}

Uses (7)

Used by (6)