def fuel

ezx@1.11.0.0 · src/add/plan.bend:296

import ezx@1.11.0.0/src/add/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/pkg/pkg.bend as K

296# fuel enough for a walk over these files: one step for the entry and one for
297# every import it can queue, and every import is a line of some file. So a
298# walk over a checkout never runs out, and the fuel is a function of the
299# checkout rather than a number, which keeps the walk from unrolling when a
300# proof reasons about a checkout it does not know.
301def fuel(fs: List<&2, K.Source>) -> Nat:
302  match fs:
303    case []:
304      1n
305    case K.Source{_at, text} <> t:
306      (List.length(&2, String, String.lines(text)) + fuel(t) : Nat)

Uses (7)

Used by (1)