def run
import bendvy-ecs-core@0.1.0.4/ordinary_app_service.bend as OrdinaryAppServiceimport Base
import bendvy-ecs-core@0.1.0.4/ordinary_service_declaration.bend as D
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/schedule_provision.bend as SP
76# Scan provided services and preflight all requirements before any schedule step.
77# Missing returns App without running its initial barrier or service. On admission,
78# apply the installed barrier then dispatch the registered service; preserve App
79# owners in every result. No guarantee covers arbitrary external call effects.
80def run(~S:Data,~C:Type,~R:Type,~E:Data,~runner:W.World<S,C,R,E> -> Unit -> Sys.Outcome<W.World<S,C,R,E>,Unit,Unit>,~scan:W.World<S,C,R,E> -> W.World<S,C,R,E> & List<&2,D.Status<S>>,app:Application<S,C,R,E,runner,scan>) -> RunResult<Application<S,C,R,E,runner,scan>,S>:
81 match app:
82 case Application{setup,plan,scheduled,world,debug}:provisioned(~S,~C,~R,~E,~runner,~scan,setup,plan,debug,SP.run(~S,~C,~R,~E,~Sys.Registry<S,C,R,E,Unit,Unit,Unit,runner>,~Unit,~dispatch(~S,~C,~R,~E,~runner),~condition(~S,~C,~R,~E),~D.provision(~S,~C,~R,~E,~scan),scheduled,world))
Uses (14)
Used by (0)
No other definition uses this definition.