def walk

bolt@1.27.0.0 · src/rules/imports.bend:154

import bolt@1.27.0.0/src/rules/imports.bend as Imports
import Base

154# the walk: `walk.spec`, step for step, through the lookups above
155def walk(
156  fuel: Nat,
157  todo: List<&2, String>,
158  +seen: List<&2, String>,
159  +es: List<&2, Edge>,
160  +read: List<&2, String>
161) -> List<&2, String>:
162  match fuel todo:
163    case 0n t:
164      seen
165    case 1n+f Nil{}:
166      seen
167    case 1n+f Con{p, rest}:
168      +found = fresh.fast(deps.first(es, p), seen, read)
169      walk(f, List.append(&2, String, found, rest), List.append(&2, String, List.reverse(&2, String, found), seen), es,
170        read)

Uses (8)

Used by (2)