src/rules/suspicious/unused.bend fails
raw source on the hub · import 0xde9bb08f7de298b03207fb5797ede9a5/src/rules/suspicious/unused.bend as Unused
rule unused: a name bound by a let, a do-bind, a lambda, or as a parameter
is never used. Pattern binders are exempt: naming every field of
Tok{k, t, l, c} reads better than _. So are names starting with _,
erased parameters (-x), which exist to be unused, a law's for names
(hypotheses the proof takes by position), and every parameter of a foreign
def (one whose body starts with import), which its C and JS bodies read,
however its header is wrapped.
7 imports
import Base import ../../src.bend as Src import ../../lazy/lazy.bend as Lazy import ../../finding.bend as F import ../../syntax/bind.bend as Bind import ../../syntax/tree.bend as Tree import ../../syntax/lex.bend as Lex
The reader could not load this file (at 0xde9bb08f7de298b03207fb5797ede9a5/src/config.bend:32). What bend.ts says:
Error:
- expected : a fresh name (duplicate declaration: Set)
- observed : 'Set'
Location:
31 | # a name (a group's or a rule's) at a level
32>| type Set is Data:
| ^^^
33 | Set{name: String, level: Level}