The internal state used by docstring elaboration
- footnotes : Std.HashMap String (Lean.Doc.Ref✝ (Lean.Doc.Inline Lean.ElabInline))
- urls : Std.HashMap String (Lean.Doc.Ref✝ String)
Instances For
The state used by DocM.
- scopes : List Elab.Command.Scope
The command elaboration scope stack.
These scopes are used when running commands inside of documentation. To keep examples self-contained, these scopes are initialized for each doc comment as if it were the beginning of a Lean file.
- lctx : LocalContext
- localInstances : LocalInstances
- options : Options
Instances For
Determines whether docstring suggestions are to be provided as part of editing the string or in a later report.
- interactive : SuggestionMode
The user is currently editing the doc comment and can react to suggestions as code actions.
- batch : SuggestionMode
The user is not editing the doc comment, and should receive suggestions as summaries.
Instances For
Equations
Instances For
Context used as a reader in DocM.
- suggestionMode : SuggestionMode
Whether suggestions should be provided interactively.
Instances For
The monad in which documentation is elaborated.
Equations
Instances For
Runs a documentation elaborator in the module docstring context.
Equations
Instances For
Runs a documentation elaborator in a declaration's context, discarding changes made to the environment.
Equations
Instances For
Gadget that indicates that a function's parameter should be treated as a Boolean flag when used in a docstring extension.
Equations
Instances For
Gadget that indicates that a function's parameter should be treated as a repeated (and thus optional) named argument when used in a docstring extension.
Equations
Instances For
Returns the syntax from which a documentation argument was drawn, typically used to report errors.
Equations
Instances For
Converts the syntax of a documentation argument into a suitable value.
Equations
Instances For
A value paired with the syntax it is derived from.
This can be used to provide hints and code actions.
- val : α
The parsed value.
- stx : Syntax
The syntax that the value was derived from.
Instances For
A canonical way to convert a documentation extension's argument into a Lean value of type α.
- fromDocArg : DocArg → Elab.TermElabM α
Converts a documentation extension's argument into a Lean value.
Instances
Equations
Equations
Retrieves the next positional argument from the arguments to a documentation extension. Throws an error if no positional arguments remain.
Equations
Instances For
Retrieves a named argument from the arguments to a documentation extension. Returns default if no
such named argument was provided.
Equations
Instances For
Retrieves a repeated named argument from the arguments to a documentation extension.
Equations
Instances For
Environment extension for code suggestions
Environment extension for code block suggestions
Environment extension for docstring roles
An expander for roles in docstrings.
Equations
Instances For
An expander for commands in docstrings.
Equations
Instances For
An expander for directives in docstrings.
Equations
Instances For
An expander for code blocks in docstrings.
Equations
Instances For
Built-in docstring roles, for bootstrapping.
Environment extension for docstring roles
Built-in docstring code blocks, for bootstrapping.
Environment extension for docstring directives
Built-in docstring directives, for bootstrapping.
Environment extension for docstring commands
Built-in docstring commands, for bootstrapping.
A provider of suggestions for code elements.
Equations
Instances For
Built-in code suggestions, for bootstrapping
Adds a builtin documentation code suggestion provider.
Should be run during initialization.
Equations
Instances For
Adds a builtin documentation role.
Should be run during initialization.
Equations
Instances For
Adds a builtin documentation code block.
Should be run during initialization.
Equations
Instances For
A provider of suggestions for code elements.
Equations
Instances For
Built-in code block suggestions, for bootstrapping
Adds a builtin documentation code suggestion provider.
Should be run during initialization.
Equations
Instances For
Adds a builtin documentation directive.
Should be run during initialization.
Equations
Instances For
Adds a builtin documentation command.
Should be run during initialization.
Equations
Instances For
Elaborates the syntax of an inline document element to an actual inline document element.
Elaborates the syntax of an block-level document element to an actual block-level document element.
Elaborates a sequence of blocks into a document.
Equations
Instances For
Elaborates a sequence of blocks into a module doc snippet.