src/codes.bend checks
raw source on the hub · import bolt@1.28.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; 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 and chars are perf,
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 21 · 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 25 · raw
List<&2, Entry>
every rule, in group order
def find.same source · line 59 · raw
@+row:Entry -> @+slug:String -> Bool
this row is the slug
def find source · line 64 · raw
@rows:List<&2, Entry> -> @+slug:String -> Maybe<&2, Entry>
the row for a slug
def code.at source · line 72 · raw
@mm:Maybe<&2, Entry> -> @+slug:String -> String
the stable code; the slug itself when it is not a rule
def code source · line 80 · raw
@+slug:String -> String
the stable code; the slug itself when it is not a rule
def group.at source · line 84 · raw
@mm:Maybe<&2, Entry> -> String
the group; empty when the slug is not a rule
def group source · line 92 · raw
@+slug:String -> String
the group; empty when the slug is not a rule
def source.at source · line 96 · raw
@mm:Maybe<&2, Entry> -> String
bolt(group:slug); bolt when the slug is not a rule
def source source · line 104 · raw
@+slug:String -> String
bolt(group:slug); bolt when the slug is not a rule