def loop.step

ezx@1.11.0.0 · src/fetch/run.bend:82

import ezx@1.11.0.0/src/fetch/run.bend as Run
import Base
import ezx@1.11.0.0/src/lock/run.bend as Run
import ezx@1.11.0.0/src/fetch/world.bend as FW
import ezx@1.11.0.0/src/fetch/plan.bend as FP

82# the planner's step: its questions answered and the loop gone round again,
83# or its plan run
84def loop.step(st: FP.Step, +lib: String, world: FW.World, go: FW.World -> IO(Unit)) -> IO(Unit):
85  match st:
86    case FP.Asking{asks}:
87      do IO<Unit>:
88        rs : List<&2, FW.Reply> <- answer.all(lib, asks)
89        go(more(world, rs))
90    case FP.Run{pl}:
91      Run.exec.plan(lib, pl)

Uses (11)

Used by (1)