Metadata for an error explanation.
summarygives a short description of the errorsinceVersionindicates the version of Lean in which an error with this error name was introducedseverityis the severity of the diagnosticremovedVersionindicates the version of Lean in which this error name was retired, if applicable
- summary : String
- sinceVersion : String
- severity : MessageSeverity
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
The
docfield is deprecated and should always be the empty 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
An environment extension that stores error explanations.
Returns an error explanation for the given name if one exists.
Equations
- Lean.getErrorExplanation? name = do let __do_lift ← Lean.getEnv pure ((Lean.errorExplanationExt.getState __do_lift).find? name)
Instances For
@[deprecated Lean.getErrorExplanation? (since := "2026-12-20")]
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
def
Lean.getErrorExplanations
{m : Type → Type}
[Monad m]
[MonadEnv m]
:
m (Array (Name × ErrorExplanation))
Returns all error explanations with their names, sorted by name.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[deprecated Lean.getErrorExplanations (since := "2026-12-20")]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[deprecated Lean.getErrorExplanations (since := "2026-12-20")]
def
Lean.getErrorExplanationsSorted
{m : Type → Type}
[Monad m]
[MonadEnv m]
:
m (Array (Name × ErrorExplanation))