def named_sites.go

bolt@1.27.0.0 · src/syntax/bind.bend:1105

import bolt@1.27.0.0/src/syntax/bind.bend as Bind
import Base

1105# every position a name not of this file is used at (Base, or through an
1106# alias)
1107def named_sites.go(uses: List<&2, Use>, +name: String) -> List<&2, Pos>:
1108  match uses:
1109    case Nil{}:
1110      Nil{}
1111    case Con{Use{+n, l, c, TLocal{tl, tc}}, rest}:
1112      named_sites.go(rest, name)
1113    case Con{Use{+n, l, c, tg}, rest}:
1114      +more = named_sites.go(rest, name)
1115      Bool.pick(List<&2, Pos>, String.eq(n, name), Pos{l, c} <> more, more)

Uses (7)

Used by (1)