src/codes.bend checks
raw source on the hub · import bolt@1.45.0.0/src/codes.bend as Codes
src/codes: the stable id of every rule. A bolt.bend still names the slug
(wrap); a diagnostic shows the code (S003) and, in an editor, the
source bolt(group:slug). Numbers are assigned once, in the group order
of src/README.md: do not renumber a rule, and do not reuse a retired code
(L004 was quantify, now closed itself; C001 was shadow and U005 was
nat, whose failures bend 2.0.25 no longer has; C007 was twice, a list
pattern opening with one literal twice, on which the checker hung through
bend 2.0.28 and does not from 2.0.38, the oldest bend bolt runs on; U014
was argv, retired before its first release, since every reader already
drops the program;
U008 table, U009 hoist, U010 ring, U012 unit and U013 scan were
retired for want of real hits, and L003 unsafe since bend 2.0.32 reports
an unsafe def a proof reaches itself). A code names the rule, not its
group: a rule that moves keeps its code (strings is perf; chars,
foreign and the cost rules fuel, index, strict and rewalk are
pedantic).
No law can say this, since it is about versions: a released code is never renumbered or reused, which review of this table keeps.
2 imports
import Base import ./lazy/lazy.bend as Lazy
Types
type Entry source · line 24 · raw
Data
one rule: the slug bolt.bend names, its code, its group
Entry@slug:String -> @id:String -> @grp:String -> Entry
Definitions
def table source · line 28 · raw
List<&2, Entry>
every rule, in group order
def find.same source · line 62 · raw
@+row:Entry -> @+slug:String -> Bool
this row is the slug
def find source · line 67 · raw
@rows:List<&2, Entry> -> @+slug:String -> Maybe<&2, Entry>
the row for a slug
def code.at source · line 75 · raw
@mm:Maybe<&2, Entry> -> @+slug:String -> String
the stable code; the slug itself when it is not a rule
def code source · line 83 · raw
@+slug:String -> String
the stable code; the slug itself when it is not a rule
def group.at source · line 87 · raw
@mm:Maybe<&2, Entry> -> String
the group; empty when the slug is not a rule
def group source · line 95 · raw
@+slug:String -> String
the group; empty when the slug is not a rule
def source.at source · line 99 · raw
@mm:Maybe<&2, Entry> -> String
bolt(group:slug); bolt when the slug is not a rule
def source source · line 107 · raw
@+slug:String -> String
bolt(group:slug); bolt when the slug is not a rule