def walk.fuel

ezx@1.11.0.0 · src/pkg/pkg.bend:1270

import ezx@1.11.0.0/src/pkg/pkg.bend as Pkg
import Base

1270# fuel enough for a walk over these files: one step for the entry and one for
1271# every import it can queue, and every import is a line of some file. A
1272# function of the files rather than a number, so no checkout is too big for
1273# it and a proof about files it does not know leaves it unevaluated.
1274def walk.fuel(fs: List<&2, Source>) -> Nat:
1275  match fs:
1276    case []:
1277      1n
1278    case Source{_at, text} <> t:
1279      (List.length(&2, String, String.lines(text)) + walk.fuel(t) : Nat)

Uses (7)

Used by (2)