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.
Instances For
Displays a name, without attempting to elaborate implicit arguments.
Instances For
Displays a name, without attempting to elaborate implicit arguments.
Instances For
Displays a name, without attempting to elaborate implicit arguments.
Instances For
Displays a name, without attempting to elaborate implicit arguments.
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*)
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*)
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)
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)
Instances For
A reference to an attribute or attribute-application syntax.
Instances For
A reference to an attribute or attribute-application syntax.
Instances For
A reference to a syntax category.
Instances For
A reference to a syntax category.
Instances For
A description of syntax in the provided category.
Instances For
A description of syntax in the provided category.
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.
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.
Instances For
An instance metavariable to be discussed in the remainder of the docstring.
This is similar to {given}, but the resulting variable is marked for instance synthesis
(with BinderInfo.instImplicit), and the name is optional.
There are two syntaxes that can be used:
{givenInstance}`T`establishes an unnamed instance of typeT.{givenInstance}`x : T`establishes a named instancexof typeT.
Additionally, the contents of the code literal can be repeated, with comma separators.
If the show flag is false (default true), then the instance is not shown in the docstring.
Instances For
An instance metavariable to be discussed in the remainder of the docstring.
This is similar to {given}, but the resulting variable is marked for instance synthesis
(with BinderInfo.instImplicit), and the name is optional.
There are two syntaxes that can be used:
{givenInstance}`T`establishes an unnamed instance of typeT.{givenInstance}`x : T`establishes a named instancexof typeT.
Additionally, the contents of the code literal can be repeated, with comma separators.
If the show flag is false (default true), then the instance is not shown in the docstring.
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
Adds the provided string str, with optional highlighting hl?, to the end of the code.
Instances For
The code represents an elaborated Lean command sequence.
- commands : DocCode
The highlighted code to be displayed.
Instances For
Elaborates a sequence of Lean commands as examples.
To make examples self-contained, elaboration ignores the surrounding 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.
Instances For
Elaborates a sequence of Lean commands as examples.
To make examples self-contained, elaboration ignores the surrounding 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.
Instances For
Displays output from a named Lean code block.
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.
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.
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.
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.
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)
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)
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.
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.
Instances For
Asserts that an equality holds.
Instances For
Asserts that an equality holds.
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.
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.
Instances For
Sets the specified option to the specified value for the remainder of the comment.
Instances For
Sets the specified option to the specified value for the remainder of the comment.
Instances For
Constructs a link to the Lean language 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.
Instances For
Constructs a link to the Lean language 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.
Instances For
Suggests given for the syntaxes not covered by suggestName.
Instances For
Suggests the lean role, if applicable.
Instances For
Suggests the leanTerm code block, if applicable.
Instances For
Suggests the lean code block, if applicable.
Instances For
Suggests the tactic role, if applicable.
Instances For
Suggests the conv role, if applicable.
Instances For
Suggests the attr role, if applicable.
Instances For
Suggests the option role, if applicable.
Instances For
Suggests the syntaxCat role, if applicable.
Instances For
Suggests the syntax role, if applicable.
Instances For
Suggests the module role, if applicable.