Empty.proofy: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/suspicious/empty.bend as Empty Lines 309-321 of bolt@1.27.0.0/src/rules/suspicious/empty.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/suspicious/empty.bend&start_line=309&end_line=321 import Base import bolt@1.27.0.0/src/syntax/lex.bend as Lex # is the def these tokens head (after `def`) a proof? Its tokens are read to # the bracket that closes its parameters, at depth zero; fin carries whether # the last token read was that bracket def proofy(toks: List<&2, Lex.Tok>, +dd: Nat, fin: Bool) -> Bool: match toks: case Nil{}: False{} case Con{Lex.Tok{+k, t, l, c}, +rest}: match fin: case True{}: proofy.end(Lex.Tok{k, t, l, c} <> rest) case False{}: proofy(rest, close.depth(k, dd), proofy.fin(k, dd)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/empty.bend&name=close.depth https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/empty.bend&name=proofy.end https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/empty.bend&name=proofy.fin https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok