~/bend-docscommunity

src/codes.bend checks

raw source on the hub · import bolt@1.26.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

Definitions

def table source · line 25 · raw

List<&2, Entry>

every rule, in group order

def find.same source · line 58 · raw

@+row:Entry -> @+slug:String -> Bool

this row is the slug

def find source · line 63 · raw

@rows:List<&2, Entry> -> @+slug:String -> Maybe<&2, Entry>

the row for a slug

def code.at source · line 71 · raw

@mm:Maybe<&2, Entry> -> @+slug:String -> String

the stable code; the slug itself when it is not a rule

def code source · line 79 · raw

@+slug:String -> String

the stable code; the slug itself when it is not a rule

def group.at source · line 83 · raw

@mm:Maybe<&2, Entry> -> String

the group; empty when the slug is not a rule

def group source · line 91 · raw

@+slug:String -> String

the group; empty when the slug is not a rule

def source.at source · line 95 · raw

@mm:Maybe<&2, Entry> -> String

bolt(group:slug); bolt when the slug is not a rule

def source source · line 103 · raw

@+slug:String -> String

bolt(group:slug); bolt when the slug is not a rule