Documentation

Lean.DocString.Add

def Lean.validateDocComment {m : TypeType} [Monad m] [MonadLiftT IO m] [MonadLog m] [AddMessageContext m] [MonadOptions m] (docstring : TSyntax `Lean.Parser.Command.docComment) :

Validates all links to the Lean reference manual in docstring.

This is intended to be used before saving a docstring that is later subject to rewriting with rewriteManualLinks.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def Lean.versoDocString (declName : Name) (binders : Syntax) (docComment : TSyntax `Lean.Parser.Command.docComment) :

    Adds a Verso docstring to the specified declaration, which should already be present in the environment.

    binders should be the syntax of the parameters to the constant that is being documented, as a null node that contains a sequence of bracketed binders. It is used to allow interactive features such as document highlights and “find references” to work for documented parameters. If no parameter binders are available, pass Syntax.missing or an empty null node.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Lean.addMarkdownDocString {m : TypeType} [Monad m] [MonadLiftT IO m] [MonadOptions m] [MonadEnv m] [MonadError m] [MonadLog m] [AddMessageContext m] (declName : Name) (docComment : TSyntax `Lean.Parser.Command.docComment) :

      Adds a Markdown docstring to the environment, validating documentation links.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def Lean.addVersoDocStringCore {m : TypeType} [Monad m] [MonadEnv m] [MonadLiftT BaseIO m] [MonadError m] (declName : Name) (docs : VersoDocString) :

        Adds an elaborated Verso docstring to the environment.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Lean.addVersoDocString (declName : Name) (binders : Syntax) (docComment : TSyntax `Lean.Parser.Command.docComment) :

          Adds a Verso docstring to the environment.

          binders should be the syntax of the parameters to the constant that is being documented, as a null node that contains a sequence of bracketed binders. It is used to allow interactive features such as document highlights and “find references” to work for documented parameters. If no parameter binders are available, pass Syntax.missing or an empty null node.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def Lean.addDocStringOf (isVerso : Bool) (declName : Name) (binders : Syntax) (docComment : TSyntax `Lean.Parser.Command.docComment) :

            Adds a docstring to the environment. If isVerso is false, then the docstring is interpreted as Markdown.

            Equations
            Instances For
              def Lean.addDocString (declName : Name) (binders : Syntax) (docComment : TSyntax `Lean.Parser.Command.docComment) :

              Adds a docstring to the environment.

              If the option doc.verso is true, the docstring is processed as a Verso docstring. Otherwise, it is considered a Markdown docstring, and documentation links are validated. To explicitly control whether the docstring is in Verso format, use addDocStringOf instead.

              For Verso docstrings, binders should be the syntax of the parameters to the constant that is being documented, as a null node that contains a sequence of bracketed binders. It is used to allow interactive features such as document highlights and “find references” to work for documented parameters. If no parameter binders are available, pass Syntax.missing or an empty null node. binders is not used for Markdown docstrings.

              Equations
              Instances For
                def Lean.addDocString' (declName : Name) (binders : Syntax) (docString? : Option (TSyntax `Lean.Parser.Command.docComment)) :

                Adds a docstring to the environment, if it is provided. If no docstring is provided, nothing happens.

                If the option doc.verso is true, the docstring is processed as a Verso docstring. Otherwise, it is considered a Markdown docstring, and documentation links are validated. To explicitly control whether the docstring is in Verso format, use addDocStringOf instead.

                For Verso docstrings, binders should be the syntax of the parameters to the constant that is being documented, as a null node that contains a sequence of bracketed binders. It is used to allow interactive features such as document highlights and “find references” to work for documented parameters. If no parameter binders are available, pass Syntax.missing or an empty null node. binders is not used for Markdown docstrings.

                Equations
                Instances For