The code represents a local variable.
- name : Name
The local variable's name.
- fvarId : FVarId
The local variable's ID.
- lctx : LocalContext
The local variable's context.
- type : Expr
The local variable's type.
Instances For
The code represents an attribute application @[...].
- stx : Lean.Syntax
The attribute syntax.
Instances For
The code represents an option.
Instances For
The code represents syntax in a given category.
- category : Name
The syntax category.
- stx : Lean.Syntax
The parsed syntax.
Instances For
Checks that a name exists when it is expected to.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Displays a name, without attempting to elaborate implicit arguments.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Displays a name, without attempting to elaborate implicit arguments.
Equations
- Lean.Doc.name.getArgs x✝ = do let full ← Lean.Doc.getNamed `full none let scope ← Lean.Doc.getNamed `scope Lean.Doc.DocScope.local Lean.Doc.done liftM (Lean.Doc.name full scope x✝)
Instances For
Displays a name, without attempting to elaborate implicit arguments.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Displays a name, without attempting to elaborate implicit arguments.
Equations
- Lean.Doc.module.getArgs x✝ = do let checked ← Lean.Doc.getFlag `checked true Lean.Doc.done liftM (Lean.Doc.module checked x✝)
Instances For
A reference to a tactic.
In {tactic}`T`, T can be any of the following:
- The name of a tactic syntax kind (e.g.
Lean.Parser.Tactic.induction) - The first token of a tactic (e.g.
induction) - Valid tactic syntax, potentially including antiquotations (e.g.
intro $x*)
Equations
- One or more equations did not get rendered due to their size.
Instances For
A reference to a tactic.
In {tactic}`T`, T can be any of the following:
- The name of a tactic syntax kind (e.g.
Lean.Parser.Tactic.induction) - The first token of a tactic (e.g.
induction) - Valid tactic syntax, potentially including antiquotations (e.g.
intro $x*)
Equations
- Lean.Doc.tactic.getArgs x✝ = do let checked ← Lean.Doc.getFlag `checked true Lean.Doc.done liftM (Lean.Doc.tactic checked x✝)
Instances For
A reference to a conv tactic.
In {conv}`T`, T can be any of the following:
- The name of a conv tactic syntax kind (e.g.
Lean.Parser.Tactic.Conv.lhs) - Valid conv tactic syntax, potentially including antiquotations (e.g.
lhs)
Equations
- One or more equations did not get rendered due to their size.
Instances For
A reference to a conv tactic.
In {conv}`T`, T can be any of the following:
- The name of a conv tactic syntax kind (e.g.
Lean.Parser.Tactic.Conv.lhs) - Valid conv tactic syntax, potentially including antiquotations (e.g.
lhs)
Equations
- Lean.Doc.conv.getArgs x✝ = do Lean.Doc.done liftM (Lean.Doc.conv x✝)
Instances For
A reference to an attribute or attribute-application syntax.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A reference to an attribute or attribute-application syntax.
Equations
- Lean.Doc.attr.getArgs x✝ = do Lean.Doc.done liftM (Lean.Doc.attr x✝)
Instances For
A reference to a syntax category.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A reference to a syntax category.
Equations
Instances For
A description of syntax in the provided category.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A description of syntax in the provided category.
Equations
- Lean.Doc.syntax.getArgs x✝ = do let cat ← Lean.Doc.getPositional `cat Lean.Doc.done liftM (Lean.Doc.syntax cat x✝)
Instances For
A metavariable to be discussed in the remainder of the docstring.
There are four syntaxes that can be used:
{given}`x`establishesx's type as a metavariable.{given (type := "A")}`x`usesAas the type for metavariablex, but does not show that to readers.{given}`x : A`usesAas the type for metavariablex.{given}`x = e`establishesxas an alias for the terme
Additionally, the contents of the code literal can be repeated, with comma separators.
If the show flag is false (default true), then the metavariable is not shown in the docstring.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A metavariable to be discussed in the remainder of the docstring.
There are four syntaxes that can be used:
{given}`x`establishesx's type as a metavariable.{given (type := "A")}`x`usesAas the type for metavariablex, but does not show that to readers.{given}`x : A`usesAas the type for metavariablex.{given}`x = e`establishesxas an alias for the terme
Additionally, the contents of the code literal can be repeated, with comma separators.
If the show flag is false (default true), then the metavariable is not shown in the docstring.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Elaborates a sequence of Lean commands as examples.
To make examples self-contained, elaboration ignores the surrouncing section scopes. Modifications to the environment are preserved during a single documentation comment, and discarded afterwards.
The named argument name allows a name to be assigned to the code block; any messages created by
elaboration are saved under this name.
The flags error and warning indicate that an error or warning is expected in the code.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Elaborates a sequence of Lean commands as examples.
To make examples self-contained, elaboration ignores the surrouncing section scopes. Modifications to the environment are preserved during a single documentation comment, and discarded afterwards.
The named argument name allows a name to be assigned to the code block; any messages created by
elaboration are saved under this name.
The flags error and warning indicate that an error or warning is expected in the code.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Displays output from a named Lean code block.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Displays output from a named Lean code block.
Equations
- Lean.Doc.output.getArgs x✝ = do let name ← Lean.Doc.getPositional `name let severity ← Lean.Doc.getNamed `severity none Lean.Doc.done liftM (Lean.Doc.output name severity x✝)
Instances For
Indicates that a code element is intended as just a literal string, with no further meaning.
This is equivalent to a bare code element, except suggestions will not be provided for it.
Equations
- Lean.Doc.lit xs = do let s ← Lean.Doc.onlyCode✝ xs pure (Lean.Doc.Inline.code (Lean.TSyntax.getString s))
Instances For
Indicates that a code element is intended as just a literal string, with no further meaning.
This is equivalent to a bare code element, except suggestions will not be provided for it.
Equations
- Lean.Doc.lit.getArgs x✝ = do Lean.Doc.done liftM (Lean.Doc.lit x✝)
Instances For
Semantic highlighting included on syntax from elaborated terms in documentation.
- const
(name : Name)
(signature : Format)
: DocHighlight
The text represents the indicated constant.
- var
(userName : Name)
(fvarId : FVarId)
(type : Format)
: DocHighlight
The text represents the indicated local variable.
The
fvarIdis not connected to a local context, but it can be useful for tracking bindings across elaborated fragments of syntax. - field
(name : Name)
(signature : Format)
: DocHighlight
The text represents the name of a field.
nameandsignaturerefer to the projection function. - option
(name declName : Name)
: DocHighlight
The text represents the name of a compiler option.
- keyword : DocHighlight
The text is an atom, such as
ifordef. - literal
(kind : SyntaxNodeKind)
(type? : Option Format)
: DocHighlight
The text is an atom that represents a literal, such as a string literal.
isLitKindreturnstrueforkind.
Instances For
A code snippet contained within a docstring. Code snippets consist of a series of strings, which are optionally associated with highlighting information.
- code : Array (String × Option DocHighlight)
The highlighted strings.
Instances For
The code represents an elaborated Lean term.
- term : DocCode
The highlighted code to be displayed.
Instances For
Treats the provided term as Lean syntax in the documentation's scope.
Instances For
Treats the provided term as Lean syntax in the documentation's scope.
Equations
- Lean.Doc.leanRole.getArgs x✝ = do let type ← Lean.Doc.getNamed `type none Lean.Doc.done liftM (Lean.Doc.leanRole type x✝)
Instances For
Treats the provided term as Lean syntax in the documentation's scope.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Treats the provided term as Lean syntax in the documentation's scope.
Equations
Instances For
A reference to an option.
In {option}`O`, O can be either:
- The name of an option (e.g.
pp.all) - Syntax to set an option to a particular value (e.g.
set_option pp.all true)
Equations
- One or more equations did not get rendered due to their size.
Instances For
A reference to an option.
In {option}`O`, O can be either:
- The name of an option (e.g.
pp.all) - Syntax to set an option to a particular value (e.g.
set_option pp.all true)
Equations
- Lean.Doc.option.getArgs x✝ = do Lean.Doc.done liftM (Lean.Doc.option x✝)
Instances For
Asserts that an equality holds.
This doesn't use the equality type because it is needed in the prelude, before the = notation is introduced.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Asserts that an equality holds.
This doesn't use the equality type because it is needed in the prelude, before the = notation is introduced.
Equations
- Lean.Doc.assert'.getArgs x✝ = do Lean.Doc.done liftM (Lean.Doc.assert' x✝)
Instances For
Asserts that an equality holds.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Asserts that an equality holds.
Equations
- Lean.Doc.assert.getArgs x✝ = do Lean.Doc.done liftM (Lean.Doc.assert x✝)
Instances For
Opens a namespace in the remainder of the documentation comment.
The +scoped flag causes scoped instances and attributes to be activated, but no identifiers are
brought into scope. The named argument only, which can be repeated, specifies a subset of names to
bring into scope from the namespace.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Opens a namespace in the remainder of the documentation comment.
The +scoped flag causes scoped instances and attributes to be activated, but no identifiers are
brought into scope. The named argument only, which can be repeated, specifies a subset of names to
bring into scope from the namespace.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Sets the specified option to the specified value for the remainder of the comment.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Sets the specified option to the specified value for the remainder of the comment.
Equations
- Lean.Doc.set_option.getArgs = do let option ← Lean.Doc.getPositional `option let value ← Lean.Doc.getPositional `value Lean.Doc.done liftM (Lean.Doc.set_option option value)
Instances For
Constructs a link to the Lean langauge reference. Two positional arguments are expected:
domainshould be one of the valid domains, such assection.nameshould be the content's canonical name in the domain.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Constructs a link to the Lean langauge reference. Two positional arguments are expected:
domainshould be one of the valid domains, such assection.nameshould be the content's canonical name in the domain.
Equations
- Lean.Doc.manual.getArgs x✝ = do let domain ← Lean.Doc.getPositional `domain let name ← Lean.Doc.getPositional `name Lean.Doc.done liftM (Lean.Doc.manual domain name x✝)
Instances For
Suggests given for the syntaxes not covered by suggestName.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Suggests the lean role, if applicable.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Suggests the leanTerm code block, if applicable.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Suggests the lean code block, if applicable.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Suggests the tactic role, if applicable.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Suggests the attr role, if applicable.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Suggests the option role, if applicable.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Suggests the syntaxCat role, if applicable.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Suggests the syntax role, if applicable.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Suggests the module role, if applicable.
Equations
- One or more equations did not get rendered due to their size.