Digest.ranged: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/digest.bend as Digest Lines 222-248 of bolt@1.27.0.0/src/rules/digest.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/digest.bend&start_line=222&end_line=248 import Base import bolt@1.27.0.0/src/syntax/bind.bend as Bind import bolt@1.27.0.0/src/syntax/outline.bend as Outline import bolt@1.27.0.0/src/rules/imports.bend as Imports # the top-level defs and types, by name and line, less the defs that are # proofs (ps): what the coverage rule grades. The uses are read in order, # once: each item but a constructor takes those before the next such item's # line, and a def or a type keeps what they name (a def's calls) def ranged( items: List<&2, Outline.Item>, +us: List<&2, Bind.Use>, +as: List<&2, Alias>, +file: String, +ps: List<&2, String> ) -> List<&2, Top>: match items: case Nil{}: Nil{} case Con{Outline.Item{Outline.ICtor{}, name, line, sig, doc, path}, rest}: ranged(rest, us, as, file, ps) case Con{Outline.Item{Outline.IDef{}, +name, line, sig, doc, path}, +rest}: +nx = next_line(rest) cs = called(upto(us, nx), as, file) +more = ranged(rest, past(us, nx), as, file, ps) Bool.pick(List<&2, Top>, Imports.has(ps, name), more, Top{Outline.IDef{}, name, line, [], cs} <> more) case Con{Outline.Item{Outline.IType{}, name, line, sig, doc, path}, +rest}: +nx = next_line(rest) Top{Outline.IType{}, name, line, ctors(rest), called(upto(us, nx), as, file)} <> ranged(rest, past(us, nx), as, file, ps) case Con{Outline.Item{kind, name, line, sig, doc, path}, +rest}: ranged(rest, past(us, next_line(rest)), as, file, ps) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/digest.bend&name=Alias https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/digest.bend&name=Top https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/digest.bend&name=called https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/digest.bend&name=ctors https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/digest.bend&name=next_line https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/digest.bend&name=past https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/digest.bend&name=upto https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/imports.bend&name=has https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=Use https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/outline.bend&name=Item https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/outline.bend&name=ItemKind