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
Instances For
Displays a name, without attempting to elaborate implicit arguments.
Equations
Instances For
Displays a name, without attempting to elaborate implicit arguments.
Equations
Instances For
Displays a name, without attempting to elaborate implicit arguments.
Equations
Instances For
Displays a name, without attempting to elaborate implicit arguments.
Equations
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
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
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
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
Instances For
A reference to an attribute or attribute-application syntax.
Equations
Instances For
A reference to an attribute or attribute-application syntax.
Equations
Instances For
A reference to a syntax category.
Equations
Instances For
A reference to a syntax category.
Equations
Instances For
A description of syntax in the provided category.
Equations
Instances For
A description of syntax in the provided category.
Equations
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
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
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.
Equations
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.
Equations
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.
Equations
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.
Equations
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.
Equations
Instances For
Displays output from a named Lean code block.
Equations
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
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
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.
Equations
Instances For
Treats the provided term as Lean syntax in the documentation's scope.
Equations
Instances For
Treats the provided term as Lean syntax in the documentation's scope.
Equations
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
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
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
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
Instances For
Asserts that an equality holds.
Equations
Instances For
Asserts that an equality holds.
Equations
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
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
Instances For
Sets the specified option to the specified value for the remainder of the comment.
Equations
Instances For
Sets the specified option to the specified value for the remainder of the comment.
Equations
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.
Equations
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.