def used

bolt@1.27.0.0 · src/rules/suspicious/unused.bend:97

import bolt@1.27.0.0/src/rules/suspicious/unused.bend as Unused
import Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
import bolt@1.27.0.0/src/syntax/bind.bend as Bind

97# is the binder at (line, col) the target of any use?
98def used(uses: List<&2, Bind.Use>, +line: U32, +col: U32) -> Bool:
99  match uses:
100    case Nil{}:
101      False{}
102    case Con{Bind.Use{n, l, c, Bind.TLocal{+tl, +tc}}, rest}:
103      Lazy.or_else(Bool.and(U32.is_eq(tl, line), U32.is_eq(tc, col)), _u => used(rest, line, col))
104    case Con{other, rest}:
105      used(rest, line, col)

Uses (8)

Used by (1)