def execute_skip
bendvy-ecs-core@0.1.0.4 · schedule_checked.bend:11
import bendvy-ecs-core@0.1.0.4/schedule_checked.bend as ScheduleChecked
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/schedule.bend as Sch
11def execute_skip(~S: Data,~C: Type,~R: Type,~E: Data,~H: Type,~Error: Data,~skip: H -> W.World<S,C,R,E> -> U32 -> H & W.World<S,C,R,E>,~dispatch: H -> W.World<S,C,R,E> -> U32 -> H & Sys.Outcome<W.World<S,C,R,E>,Error,Unit>,~condition: W.World<S,C,R,E> -> U32 -> W.World<S,C,R,E> & Result<Error,Bool>,steps: List<&2,Sch.Step>,owners: H,world: W.World<S,C,R,E>,+namespace: U32,+name: String,+all: List<&2,Sch.Step>,+observations: List<&2,Sch.Observation>) -> Sch.RunResult<S,C,R,E,H,Error>:
12 match steps:
13 case []: Sch.Finished{Sch.Schedule{namespace,name,all,owners},world,observations}
14 case Sch.Phase{phase} <> rest: execute_skip(~S,~C,~R,~E,~H,~Error,~skip,~dispatch,~condition,rest,owners,world,namespace,name,all,List.append(&2,Sch.Observation,observations,[Sch.Entered{phase}]))
15 case Sch.Barrier{} <> rest: execute_skip(~S,~C,~R,~E,~H,~Error,~skip,~dispatch,~condition,rest,owners,W.barrier(~S,~C,~R,~E,world),namespace,name,all,List.append(&2,Sch.Observation,observations,[Sch.Applied{}]))
16 case Sch.System{+id,slot} <> rest: after_condition(~S,~C,~R,~E,~H,~Error,~skip,~dispatch,h => w => obs => execute_skip(~S,~C,~R,~E,~H,~Error,~skip,~dispatch,~condition,rest,h,w,namespace,name,all,obs),condition(world,slot),owners,namespace,name,all,observations,id)