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
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
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
A structure that records details of a function parameter.
- name : Lake.Name
Binder name for the parameter.
- bInfo : Lean.BinderInfo
Binder info for the parameter.
The default value for the parameter, if the parameter has a default value.
- isAutoParam : Bool
Whether the parameter is an autoparam (i.e., whether it uses a tactic for the default value).
Instances For
Returns true if the parameter is an explicit parameter that has neither a default value nor a tactic.
Equations
- Lean.PrettyPrinter.Delaborator.ParamKind.isRegularExplicit param = (Lean.BinderInfo.isExplicit param.bInfo && !param.isAutoParam && Option.isNone param.defVal)
Instances For
Given a function f
supplied with arguments args
, returns an array whose n-th element
is set to the kind of the n-th argument's associated parameter.
We do not assume the expression mkAppN f args
is sensical,
and this function captures errors (except for panics) and returns the empty array.
The returned array might be longer than the number of arguments.
It gives parameter kinds for the fully-applied function.
Note: the defVal
expressions are only guaranteed to be valid for parameters associated to the supplied arguments;
after this, they might refer to temporary fvars.
This function properly handles "overapplied" functions.
For example, while id
takes one explicit argument, it can take more than one explicit
argument when its arguments are specialized to function types, like in id id 2
.
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 true if an application should use explicit mode when delaborating.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns true if the application is a candidate for unexpanders.
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
Delaborates a function application in explicit mode, and ensures the resulting
head syntax is wrapped with @
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Delaborates a function application in the standard mode, where implicit arguments are generally not included.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Delaborates applications. Removes up to maxArgs
arguments to form
the "head" of the application and delaborates the head using delabHead
.
The remaining arguments are processed depending on whether heuristics indicate that the application
should be delaborated using @
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Default delaborator for applications.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The withOverApp
combinator allows delaborators to handle "over-application" by using the core
application delaborator to handle additional arguments.
For example, suppose f : {A : Type} → Foo A → A
and we want to implement a delaborator for
applications f x
to pretty print as F[x]
. Because A
is a type variable we might encounter
a term of the form @f (A → B) x y
, which has an additional argument y
.
With this combinator one can use an arity-2 delaborator to pretty print this as F[x] y
.
arity
: the expected number of arguments tof
. The combinator will fail if fewer than this number of arguments are passed, and if more than this number of arguments are passed the arguments are handled using the standard application delaborator.x
: constructs data corresponding to the main application (f x
in the example)
Equations
- One or more equations did not get rendered due to their size.
Instances For
State for delabAppMatch
and helpers.
- info : Lean.Meta.MatcherInfo
- matcherTy : Lean.Expr
- motiveNamed : Bool
Instances For
Delaborates applications of the form letFun v (fun x => b)
as let_fun x := v; b
.
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
Check for a Syntax.ident
of the given name anywhere in the tree.
This is usually a bad idea since it does not check for shadowing bindings,
but in the delaborator we assume that bindings are never shadowed.
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Core function that delaborates a natural number (an OfNat.ofNat
literal).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Core function that delaborates a negative integer literal (a Neg.neg
applied to OfNat.ofNat
).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Core function that delaborates a rational literal that is the division of an integer literal by a natural number literal. The division must be homogeneous for it to count as a rational literal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Delaborates an OfNat.ofNat
literal.
@OfNat.ofNat _ n _
~> n
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Delaborates the negative of an OfNat.ofNat
literal.
-@OfNat.ofNat _ n _
~> -n
Equations
- One or more equations did not get rendered due to their size.
Instances For
Delaborates a rational number literal.
@OfNat.ofNat _ n _ / @OfNat.ofNat _ m
~> n / m
and -@OfNat.ofNat _ n _ / @OfNat.ofNat _ m
~> -n / m
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
Delaborate a projection primitive. These do not usually occur in
user code, but are pretty-printed when e.g. #print
ing a projection
function.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Delaborate a call to a projection function such as Prod.fst
.
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
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
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
Pretty-prints a constant c
as c.{<levels>} <params> : <type>
.
Equations
- One or more equations did not get rendered due to their size.