The areas / V01. The language of Mathlib
Mathlib.Lean.Elab.Tactic.Basic
2 declarations. Mathlib docs · Source
Additions to Lean.Elab.Tactic.Basic
def Lean.Elab.Tactic.getMainTarget'' E1 #
Lean.Elab.Tactic.TacticM Lean.Expr
Return expected type for the main goal, cleaning up annotations, using Lean.MVarId.getType''.
Remark: note that MVarId.getType' uses whnf instead of cleanupAnnotations, and
MVarId.getType'' also uses cleanupAnnotations
def Lean.Elab.Tactic.commitIfNoExPreservingInfoAndMessages E1 #
{α : Type} → Lean.Elab.Tactic.TacticM α → Lean.Elab.Tactic.TacticM α
Runs x, and if x throws an exception, rewinds the tactic state except for the InfoState
and Messages. This means that hovers and error messages created within x are preserved.
Note: x is run under withSaveInfoContext in order to propagate hovers and messages correctly.
This means that pre-existing infotrees are not accessible from within x.