Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.CustomInfo.format x = let i := x; Std.format "CustomInfo(" ++ Std.format (Dynamic.typeName i.value) ++ Std.format ")"
Equations
- Lean.Elab.instToFormatCustomInfo = { format := Lean.Elab.CustomInfo.format }
Instantiate the holes on the given tree
with the assignment table.
(analoguous to instantiating the metavariables in an expression)
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.ContextInfo.toPPContext info lctx = { env := info.env, mctx := info.mctx, lctx := lctx, opts := info.options, currNamespace := info.currNamespace, openDecls := info.openDecls }
Equations
- Lean.Elab.ContextInfo.ppSyntax info lctx stx = Lean.ppTerm (Lean.Elab.ContextInfo.toPPContext info lctx) { raw := stx }
Equations
- Lean.Elab.TermInfo.runMetaM info ctx x = Lean.Elab.ContextInfo.runMetaM ctx info.lctx x
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.CommandInfo.format ctx info = pure (Std.format "command @ " ++ Std.format (Lean.Elab.formatElabInfo ctx info.toElabInfo) ++ Std.format "")
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.UserWidgetInfo.format info = Std.format "UserWidget " ++ Std.format info.widgetId ++ Std.format "\n" ++ Std.format (Std.format info.props) ++ Std.format ""
Equations
- Lean.Elab.FVarAliasInfo.format info = Std.format "FVarAlias " ++ Std.format (Lean.Name.eraseMacroScopes info.userName) ++ Std.format ""
Equations
- Lean.Elab.FieldRedeclInfo.format ctx info = Std.format "FieldRedecl @ " ++ Std.format (Lean.Elab.formatStxRange ctx info.stx) ++ Std.format ""
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Helper function for propagating the tactic metavariable context to its children nodes.
We need this function because we preserve TacticInfo
nodes during backtracking and their
children. Moreover, we backtrack the metavariable context to undo metavariable assignments.
TacticInfo
nodes save the metavariable context before/after the tactic application, and
can be pretty printed without any extra information. This is not the case for TermInfo
nodes.
Without this function, the formatting method would often fail when processing TermInfo
nodes
that are children of TacticInfo
nodes that have been preserved during backtracking.
Saving the metavariable context at TermInfo
nodes is also not a good option because
at TermInfo
creation time, the metavariable context often miss information, e.g.,
a TC problem has not been resolved, a postponed subterm has not been elaborated, etc.
See Term.SavedState.restore
.
Equations
- One or more equations did not get rendered due to their size.
Returns the current array of InfoTrees and resets it to an empty array.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.pushInfoTree t = do let __do_lift ← Lean.Elab.getInfoState if __do_lift.enabled = true then Lean.Elab.modifyInfoTrees fun ts => Lean.PersistentArray.push ts t else pure PUnit.unit
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
- One or more equations did not get rendered due to their size.
This does the same job as resolveGlobalConstNoOverload
; resolving an identifier
syntax to a unique fully resolved name or throwing if there are ambiguities.
But also adds this resolved name to the infotree. This means that when you hover
over a name in the sourcefile you will see the fully resolved name in the hover info.
Equations
- One or more equations did not get rendered due to their size.
Similar to resolveGlobalConstNoOverloadWithInfo
, except if there are multiple name resolutions then it returns them as a list.
Equations
- One or more equations did not get rendered due to their size.
Similar to resolveGlobalName
, but it also adds the resolved name to the info tree.
Equations
- One or more equations did not get rendered due to their size.
Use this to descend a node on the infotree that is being built.
It saves the current list of trees t₀
and resets it and then runs x >>= mkInfo
, producing either an i : Info
or a hole id.
Running x >>= mkInfo
will modify the trees state and produce a new list of trees t₁
.
In the i : Info
case, t₁
become the children of a node node i t₁
that is appended to t₀
.
Equations
- One or more equations did not get rendered due to their size.
Saves the current list of trees t₀
, runs x
to produce a new tree list t₁
and
runs mkInfoTree t₁
to get n : InfoTree
and then restores the trees to be t₀ ++ [n]
.
Equations
- One or more equations did not get rendered due to their size.
Run x
as a new child infotree node with header given by mkInfo
.
Equations
- Lean.Elab.withInfoContext x mkInfo = Lean.Elab.withInfoTreeContext x fun trees => do let __do_lift ← mkInfo pure (Lean.Elab.InfoTree.node __do_lift trees)
Resets the trees state t₀
, runs x
to produce a new trees
state t₁
and sets the state to be t₀ ++ (InfoTree.context Γ <$> t₁)
where Γ
is the context derived from the monad state.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.getInfoHoleIdAssignment? mvarId = do let __do_lift ← Lean.Elab.getInfoState pure __do_lift.assignment[mvarId]
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.enableInfoTree flag = Lean.Elab.modifyInfoState fun s => { enabled := flag, assignment := s.assignment, trees := s.trees }
Equations
- One or more equations did not get rendered due to their size.