def narrow

bolt@1.27.0.0 · src/rules/pedantic/rewalk.bend:361

import bolt@1.27.0.0/src/rules/pedantic/rewalk.bend as Rewalk
import Base
import bolt@1.27.0.0/src/syntax/tree.bend as Tree

361# a slot or a field is narrow; a wide use is not; a let depends on the name's reads
362def narrow(hh: How, +body: Tree.Node) -> Bool:
363  match hh:
364    case HWide{}:
365      False{}
366    case HSlot{}:
367      True{}
368    case HField{}:
369      True{}
370    case HLet{+binder}:
371      narrow_let(hits(body, binder, False{}, 0n, False{}, False{}))

Uses (5)

Used by (1)