src/rules/suspicious/ring.bend fails
raw source on the hub · import 0xde9bb08f7de298b03207fb5797ede9a5/src/rules/suspicious/ring.bend as Ring
rule ring: a self-call replaces a binder with List.append of List.drop
(or String.append / ++, or tail) by a constant count, passing it back
in the binder's own parameter position. Each step copies that fixed window.
Keep it in an Array and advance an index. A list the def matches and walks
(as any scrutinee of a match) is variable-length input, a window dropped
into another parameter's slot is not carried, and a one-shot trim is not a
loop: all stay quiet. Growing an accumulator by append, with no drop of
that same value, is concat. Laws and proofs do not run (a def with no
type at all fills a law: it is a proof).
7 imports
import Base import ../../src.bend as Src import ../../finding.bend as F import ../../syntax/lex.bend as Lex import ../../syntax/tree.bend as Tree import ../calls.bend as Calls import ../../lazy/lazy.bend as Lazy
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}