Documentation

Lean.IdentifierSuggestion

def Lean.getSuggestions {m : TypeType} [Monad m] [MonadEnv m] (incorrectName : Name) :

Given a name, find all the stored correct, existing identifiers that mention that name in a suggest_for annotation.

Equations
    Instances For
      def Lean.getStoredSuggestions {m : TypeType} [Monad m] [MonadEnv m] (trueName : Name) :

      Given a (presumably existing) identifier, find all the suggest_for annotations that were given for that identifier.

      Equations
        Instances For
          def Lean.throwUnknownNameWithSuggestions {α : Type} (constName : Name) (idOrConst : String := "identifier") (declHint : Name := constName) (ref? : Option Syntax := none) (extraMsg : MessageData := MessageData.nil) :

          Throw an unknown constant/identifier error message, potentially suggesting alternatives using suggest_for attributes.

          The replacement will mimic the path structure of the original as much as possible if they share a path prefix: if there is a suggestion for replacing Foo.Bar.jazz with Foo.Bar.baz, then Bar.jazz will be replaced by Bar.baz unless the resulting constant is ambiguous.

          Equations
            Instances For
              def Lean.Elab.Term.hintAutoImplicitFailure (exp : Expr) (expected : String := "a function") :
              Equations
                Instances For