Documentation

Lean.ErrorExplanation

Metadata for an error explanation.

  • summary gives a short description of the error
  • sinceVersion indicates the version of Lean in which an error with this error name was introduced
  • severity is the severity of the diagnostic
  • removedVersion indicates the version of Lean in which this error name was retired, if applicable
Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    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.

        Instances For

          Returns the error explanation summary prepended with its severity. For use in completions and hovers.

          Equations
          Instances For

            The kind of a code block in an error explanation example. broken blocks raise the diagnostic being explained; fixed blocks must compile successfully.

            Instances For
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Equations
                • One or more equations did not get rendered due to their size.

                Metadata about a code block in an error explanation, parsed from the block's info string.

                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Parse metadata for an error explanation code block from its info string.

                    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
                          Instances For
                            def Lean.hasErrorExplanation {m : TypeType} [Monad m] [MonadEnv m] [MonadLiftT BaseIO m] (name : Name) :

                            Returns true if there exists an error explanation named name.

                            Equations
                            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
                                  Instances For