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
- options : Options
Instances For
The monad in which documentation is elaborated.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Doc.instMonadLiftTermElabMDocM = { monadLift := fun {α : Type} (act : Lean.Elab.TermElabM α) => Lean.Doc.instMonadLiftTermElabMDocM._private_1 act }
Runs a documentation elaborator, discarding changes made to the environment.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Gadget that indicates that a function's parameter should be treated as a Boolean flag when used in a docstring extension.
Equations
- Lean.Doc.flag default = Bool
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
- Lean.Doc.many α = Array α
Instances For
Equations
- One or more equations did not get rendered due to their size.
Returns the syntax from which a documentation argument was drawn, typically used to report errors.
Equations
- (Lean.Doc.DocArg.ident x_1).syntax = x_1.raw
- (Lean.Doc.DocArg.num n).syntax = n.raw
- (Lean.Doc.DocArg.str s).syntax = s.raw
Instances For
Converts the syntax of a documentation argument into a suitable value.
Equations
- One or more equations did not get rendered due to their size.
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
- Lean.Doc.instFromDocArgOption = { fromDocArg := fun (v : Lean.Doc.DocArg) => Lean.Doc.instFromDocArgOption._private_1 v }
Equations
- Lean.Doc.instFromDocArgWithSyntax = { fromDocArg := fun (v : Lean.Doc.DocArg) => Lean.Doc.instFromDocArgWithSyntax._private_1 v }
Equations
- Lean.Doc.instFromDocArgIdent = { fromDocArg := fun (v : Lean.Doc.DocArg) => Lean.Doc.instFromDocArgIdent._private_1 v }
Equations
- Lean.Doc.instFromDocArgString = { fromDocArg := fun (v : Lean.Doc.DocArg) => Lean.Doc.instFromDocArgString._private_1 v }
Equations
- Lean.Doc.instFromDocArgStrLit = { fromDocArg := fun (v : Lean.Doc.DocArg) => Lean.Doc.instFromDocArgStrLit._private_1 v }
Equations
- Lean.Doc.instFromDocArgNat = { fromDocArg := fun (v : Lean.Doc.DocArg) => Lean.Doc.instFromDocArgNat._private_1 v }
Equations
- Lean.Doc.instFromDocArgNumLit = { fromDocArg := fun (v : Lean.Doc.DocArg) => Lean.Doc.instFromDocArgNumLit._private_1 v }
Equations
- Lean.Doc.instFromDocArgDataValue = { fromDocArg := fun (v : Lean.Doc.DocArg) => Lean.Doc.instFromDocArgDataValue._private_1 v }
Equations
- Lean.Doc.instFromDocArgBool = { fromDocArg := fun (v : Lean.Doc.DocArg) => Lean.Doc.instFromDocArgBool._private_1 v }
Equations
- Lean.Doc.instFromDocArgMessageSeverity = { fromDocArg := fun (v : Lean.Doc.DocArg) => Lean.Doc.instFromDocArgMessageSeverity._private_1 v }
Retrieves the next positional argument from the arguments to a documentation extension. Throws an error if no positional arguments remain.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Retrieves a named argument from the arguments to a documentation extension. Returns default
if no
such named argument was provided.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Retrieves a repeated named argument from the arguments to a documentation extension.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Adds a builtin documentation code suggestion provider.
Should be run during initialization.
Equations
- Lean.Doc.addBuiltinCodeSuggestion decl = ST.Ref.modify Lean.Doc.builtinCodeSuggestions✝ fun (x : Lean.NameSet) => x.insert decl
Instances For
Adds a builtin documentation role.
Should be run during initialization.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Adds a builtin documentation code block.
Should be run during initialization.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Adds a builtin documentation directive.
Should be run during initialization.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Adds a builtin documentation command.
Should be run during initialization.
Equations
- One or more equations did not get rendered due to their size.
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
- One or more equations did not get rendered due to their size.