Saved data that describes a custom inline element.
The type of value contained within the Dynamic determines the interpretation of the custom
element, including how it is rendered to Markdown for the language server.
- custom
(val : Dynamic)
: ElabInline
A custom inline element. The type of the value in the
Dynamicdetermines how it is interpreted and rendered. - deferred
(index : Nat)
: ElabInline
A deferred check that lacked sufficient information when it was used (e.g. a forward references to a name in a downstream module). The
indexidentifies it among the docstring's deferred checks that are stored in an environment extension. Inline and block deferred checks use the same counter.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Saved data that describes a custom block element.
The type of value contained within the Dynamic determines the interpretation of the custom
element, including how it is rendered to Markdown for the language server.
- custom
(val : Dynamic)
: ElabBlock
A custom block element. The type of the value in the
Dynamicdetermines how it is interpreted and rendered. - deferred
(index : Nat)
: ElabBlock
A deferred check that lacked sufficient information when it was used (e.g. a forward references to a name in a downstream module). The
indexidentifies it among the docstring's deferred checks that are stored in an environment extension. Inline and block deferred checks use the same counter.
Instances For
Equations
- One or more equations did not get rendered due to their size.
A custom inline element val. The type α determines how it is interpreted. In contexts where α
is not understood, content is used as a fallback.
Equations
- Lean.Doc.Inline.custom val content = Lean.Doc.Inline.other (Lean.ElabInline.custom (Dynamic.mk val)) content
Instances For
An inline element with a deferred check. The index is a 0-based index into the current docstring's
deferred checks, in source order. Block and inline deferred elements share a counter.
Equations
- Lean.Doc.Inline.deferred index content = Lean.Doc.Inline.other (Lean.ElabInline.deferred index) content
Instances For
A custom block element val. The type α determines how it is interpreted. In contexts where α
is not understood, content is used as a fallback.
Equations
- Lean.Doc.Block.custom val content = Lean.Doc.Block.other (Lean.ElabBlock.custom (Dynamic.mk val)) content
Instances For
A block element with a deferred check. The index is a 0-based index into the current docstring's
deferred checks, in source order. Block and inline deferred elements share a counter.
Equations
- Lean.Doc.Block.deferred index content = Lean.Doc.Block.other (Lean.ElabBlock.deferred index) content
Instances For
- text : Array (Doc.Block ElabInline ElabBlock)
- subsections : Array (Doc.Part ElabInline ElabBlock Empty)
Instances For
Equations
Adds a builtin docstring to the compiler.
Links to the Lean manual aren't validated.
Equations
- Lean.addBuiltinDocString declName docString = ST.Ref.modify Lean.builtinDocStrings✝ fun (x : Lean.NameMap String) => x.insert declName docString.removeLeadingSpaces
Instances For
Removes a builtin docstring from the compiler. This is used when translating between formats.
Equations
- Lean.removeBuiltinDocString declName = ST.Ref.modify Lean.builtinDocStrings✝ fun (x : Lean.NameMap String) => Std.TreeMap.erase x declName
Instances For
Retrieves all builtin Verso docstrings.
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
Equations
- Lean.addDocStringCore' declName (some docString) = Lean.addDocStringCore declName docString
- Lean.addDocStringCore' declName none = pure ()
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Finds a docstring without performing any alias resolution or enrichment with extra metadata.
For Markdown docstrings, the result is a string; for Verso docstrings, it's a VersoDocString.
Docstrings to be shown to a user should be looked up with Lean.findDocString? instead.
Equations
- Lean.addMainModuleDoc env doc = Lean.PersistentEnvExtension.addEntry Lean.moduleDocExt✝ env doc
Instances For
Equations
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
Checks whether stx is a docstring that was parsed as Verso rather than Markdown.
Instances For
A snippet of a Verso module text.
A snippet consists of text followed by subsections. Because the sequence of snippets that occur in a source file are conceptually a single document, they have a consistent header nesting structure. This means that initial textual content of a snippet is a continuation of the text at the end of the prior snippet.
The actual hierarchical structure of the document is reconstructed from the sequence of snippets.
The terminal nesting of a sequence of snippets is 0 if there are no sections in the sequence. Otherwise, it is one greater than the nesting of the last snippet's last section. The module docstring elaborator maintains the invariant that each snippet's first section's level is at most the terminal nesting of the preceding snippets, and that the level of each section within a snippet is at most one greater than the preceding section's level.
- text : Array (Doc.Block ElabInline ElabBlock)
Text to be inserted after the prior snippet's ending text.
- sections : Array (Nat × DeclarationRange × Doc.Part ElabInline ElabBlock Empty)
A sequence of parts with their absolute document nesting levels and header positions. None of these parts may contain sub-parts.
- declarationRange : DeclarationRange
The location of the snippet in the source file.
Instances For
Equations
Equations
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
Equations
Instances For
Equations
Equations
- { snippets := snippets }.terminalNesting = snippets.findSomeRev? fun (x : Lean.VersoModuleDocs.Snippet) => x.terminalNesting
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- docs.canAdd snippet = match docs.terminalNesting with | some level => Lean.VersoModuleDocs.Snippet.canNestIn level snippet | x => true
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the Verso module docs for the current main module.
During elaboration, this will return the modules docs that have been added thus far, rather than those for the entire module.
Equations
Instances For
Instances For
Returns all snippets of the Verso module docs from the indicated module, if they exist.
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.