def loop

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

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

100# the loop, under fuel. A package asks at most twice, for its tree under
101# BEND_LIB and for its fetch, and every round answers what it asked, so the
102# fuel is only a guard.
103def loop(fuel: Nat, +lib: String, +world: FW.World) -> IO(Unit):
104  match fuel:
105    case 0n:
106      IO.die(Unit, 1, "ez: ez fetch kept asking questions")
107    case 1n+f:
108      loop.step(FP.step(world), lib, world, w => loop(f, lib, w))

Uses (8)

Used by (1)