BangAfterFork.after: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/performance/bang_after_fork.bend as BangAfterFork Lines 77-98 of bend-lint-rules@0.2.0.0/performance/bang_after_fork.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/performance/bang_after_fork.bend&start_line=77&end_line=98 import Base import bend-lint-api@0.2.0.0/linter/lint.bend as Lint import bend-lint-rules@0.2.0.0/performance/deep_call_in_fork.bend as Deep # Whether a fork runs before the node below `path`, in the same evaluation, or `found`: a let above it, whose rest of # block it is in, forks (a parallel let, or a value that forks), and no lambda (the rest of an IO step) comes between. def after(path: List<&2, Lint.Above>, +program: Program, found: Bool) -> Bool: match path found: case _ True{}: True{} case Nil{} False{}: False{} case Con{Lint.Above{Lint.Node{Lint.Lambda{b, q}, n, s, k, f}, at}, rest} False{}: False{} case Con{Lint.Above{Lint.Node{Lint.Body{}, n, s, k, f}, at}, rest} False{}: False{} case Con{Lint.Above{Lint.Node{Lint.Destructure{q}, n, s, +kids, f}, at}, rest} False{}: after( rest, program, let.forks(Deep.is_last(kids, at), Nat.is_gt(Deep.binders(kids, 0n), 1n), kids, program) ) case Con{Lint.Above{Lint.Node{Lint.Let{}, n, s, +kids, f}, at}, rest} False{}: after(rest, program, let.forks(Deep.is_last(kids, at), False{}, kids, program)) case Con{a, rest} False{}: after(rest, program, False{}) Uses (10): 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.is_gt https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Above https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Syntax https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/bang_after_fork.bend&name=Program https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/bang_after_fork.bend&name=let.forks https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/deep_call_in_fork.bend&name=binders https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/deep_call_in_fork.bend&name=is_last