~/bend-docscommunity

src/codes.bend checks

raw source on the hub · import 0x013e0f9a479bbebad5ed196725eede95/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).

2 imports
import Base
import ./lazy/lazy.bend as Lazy

Types

type Entry source · line 11 · raw

Data

one rule: the slug bolt.bend names, its code, its group

Definitions

def table source · line 15 · raw

List<&2, Entry>

every rule, in group order

def find.same source · line 49 · raw

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

this row is the slug

def find source · line 54 · raw

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

the row for a slug

def code.at source · line 62 · raw

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

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

def code source · line 70 · raw

@+slug:String -> String

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

def group.at source · line 74 · raw

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

the group; empty when the slug is not a rule

def group source · line 82 · raw

@+slug:String -> String

the group; empty when the slug is not a rule

def source.at source · line 86 · raw

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

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

def source source · line 94 · raw

@+slug:String -> String

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