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
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.
@[deprecated Lean.getErrorExplanation? (since := "2026-12-20")]
Equations
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
Instances For
@[deprecated Lean.getErrorExplanations (since := "2026-12-20")]
Equations
Instances For
@[deprecated Lean.getErrorExplanations (since := "2026-12-20")]
def
Lean.getErrorExplanationsSorted
{m : Type → Type}
[Monad m]
[MonadEnv m]
:
m (Array (Name × ErrorExplanation))