Metadata for an error explanation.
summary
gives a short description of the errorsinceVersion
indicates the version of Lean in which an error with this error name was introducedseverity
is the severity of the diagnosticremovedVersion
indicates the version of Lean in which this error name was retired, if applicable
- summary : String
- sinceVersion : String
- severity : MessageSeverity
Instances For
Equations
Equations
An explanation of a named error message.
Error explanations are rendered in the manual; a link to the resulting manual page is displayed at
the bottom of corresponding error messages thrown using throwNamedError
or throwNamedErrorAt
.
- doc : String
- metadata : Metadata
- declLoc? : Option DeclarationLocation
Instances For
Returns the error explanation summary prepended with its severity. For use in completions and hovers.
Equations
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
Instances For
Equations
Parses the contents of a string literal up to, but excluding, the closing quotation mark.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Parses all input up to the next whitespace. If nonempty
is true
, fails if there is no input
prior to the next whitespace.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Parses a named attribute, and returns its name and value.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Parses an "attribute" in an info string, either a space-delineated identifier or a named
attribute of the form (name := "value")
.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Validates that the given error explanation has the expected structure. If an error is found, it is
represented as a pair (lineNumber, errorMessage)
where lineNumber
gives the 0-based offset from
the first line of doc
at which the error occurs.
Equations
Instances For
An environment extension that stores error explanations.
Returns an error explanation for the given name if one exists, rewriting manual links.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns an error explanation for the given name if one exists without rewriting manual links.
In general, use Lean.getErrorExplanation?
instead if the body of the explanation will be used.
Equations
- Lean.getErrorExplanationRaw? env name = (Lean.errorExplanationExt.getState env).find? name
Instances For
Returns true
if there exists an error explanation named name
.
Equations
- Lean.hasErrorExplanation name = do let __do_lift ← Lean.getEnv pure ((Lean.errorExplanationExt.getState __do_lift).contains name)
Instances For
Returns all error explanations with their names as an unsorted array, without rewriting manual links.
In general, use Lean.getErrorExplanations
or Lean.getErrorExplanationsSorted
instead of this
function if the bodies of the fetched explanations will be used.
Equations
Instances For
Returns all error explanations with their names, rewriting manual links.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns all error explanations with their names as a sorted array, rewriting manual links.
Equations
- Lean.getErrorExplanationsSorted = do let __do_lift ← Lean.getErrorExplanations pure (__do_lift.qsort fun (e e' : Lean.Name × Lean.ErrorExplanation) => decide (e.fst.toString < e'.fst.toString))