Space.unimported: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/style/space.bend as Space Lines 62-74 of bolt@1.27.0.0/src/rules/style/space.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/style/space.bend&start_line=62&end_line=74 import Base import bolt@1.27.0.0/src/syntax/lex.bend as Lex import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy # the tokens with every import line cut to its newline, so the width counts # no import; start is whether the token opens its line, and cutting whether # it is on an import line def unimported(toks: List<&2, Lex.Tok>, start: Bool, cutting: Bool) -> List<&2, Lex.Tok>: match toks: case Nil{}: Nil{} case Con{Lex.Tok{Lex.TNewline{}, t, l, c}, rest}: Lex.Tok{Lex.TNewline{}, t, l, c} <> unimported(rest, True{}, False{}) case Con{Lex.Tok{k, +t, l, c}, +rest}: +cuts = Bool.or(cutting, Bool.and(start, String.eq(t, "import"))) Lazy.either(List<&2, Lex.Tok>, cuts, _u => unimported(rest, False{}, True{}), _v => Lex.Tok{k, t, l, c} <> unimported(rest, False{}, False{})) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lazy/lazy.bend&name=either https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=TokKind