def is_live_inside
bend-lint-rules@0.2.0.0 · language/reused_binder.bend:62
import bend-lint-rules@0.2.0.0/language/reused_binder.bend as ReusedBinder
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
62
63
64def is_live_inside(+node: Lint.Node, live: Bool) -> Bool:
65 match node:
66 case Lint.Node{Lint.Body{}, n, s, k, f}:
67 True{}
68 case Lint.Node{Lint.Equality{}, n, s, k, f}:
69 False{}
70 case Lint.Node{Lint.Forall{b, q}, n, s, k, f}:
71 False{}
72 case Lint.Node{Lint.TypeApplication{t}, n, s, k, f}:
73 False{}
74 case Lint.Node{Lint.Application{}, n, s, kids, f}:
75 live && Bool.not(Lint.is_pair(kids))
76 case _:
77 live