def loop

bolt@1.27.0.0 · src/lint.bend:95

import bolt@1.27.0.0/src/lint.bend as Lint
import Base
import bolt@1.27.0.0/src/lint/world.bend as W
import bolt@1.27.0.0/src/lint/plan.bend as Plan

95# the loop, under fuel: the walk's bound, plus a round for the texts and one
96# to plan. Every round adds at least one answer, since the planner never asks
97# what the World answers already.
98def loop(fuel: Nat, +world: W.World) -> IO(Unit):  # noqa: L001 IO driver
99  match fuel:
100    case 0n:
101      IO.die(Unit, 1, "bolt: the lint kept asking")
102    case 1n+f:
103      loop.step(Plan.wants(world), world, ww => loop(f, ww))

Uses (7)

Used by (1)