def loop

ezx@1.11.0.0 · src/add/run.bend:68

import ezx@1.11.0.0/src/add/run.bend as Run
import Base
import ezx@1.11.0.0/src/add/relock.bend as AR
import ezx@1.11.0.0/src/ws/relock.bend as Rel

68# the loop, under fuel. Every round adds an answer, since the planner never
69# asks what the World answers already, so the fuel is only a guard.
70def loop(fuel: Nat, +lib: String, +ws: Rel.Ws, +world: AR.World) -> IO(Unit):
71  match fuel:
72    case 0n:
73      IO.die(Unit, 1, "ez: ez add kept asking questions")
74    case 1n+f:
75      loop.step(Rel.add.next(ws, world), lib, world, w => loop(f, lib, ws, w))

Uses (9)

Used by (1)