- ctx : Meta.Grind.Context
- methods : Meta.Grind.Methods
- params : Meta.Grind.Params
Instances For
- state : Meta.Grind.State
- goals : List Meta.Grind.Goal
Instances For
- term : Term.SavedState
- tactic : State
Instances For
Equations
Instances For
Equations
Instances For
Returns the list of goals. Goals may or may not already be assigned.
Equations
- Lean.Elab.Tactic.Grind.getGoals = do let __do_lift ← get pure __do_lift.goals
Instances For
Equations
- Lean.Elab.Tactic.Grind.setGoals goals = modify fun (s : Lean.Elab.Tactic.Grind.State) => { state := s.state, goals := goals }
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
- Lean.Elab.Tactic.Grind.saveState = do let __do_lift ← liftM Lean.Elab.Term.saveState let __do_lift_1 ← get pure { term := __do_lift, tactic := __do_lift_1 }
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.Tactic.Grind.instInhabitedGrindTacticM = { default := fun (x : Lean.Elab.Tactic.Grind.Context) (x_1 : ST.Ref IO.RealWorld Lean.Elab.Tactic.Grind.State) => default }
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
- Lean.Elab.Tactic.Grind.withTacticInfoContext stx x = do let __do_lift ← Lean.Elab.Tactic.Grind.mkInitialTacticInfo stx Lean.Elab.withInfoContext x __do_lift
Instances For
- exception : Exception
- state : SavedState
Instances For
Equations
- Lean.Elab.Tactic.Grind.throwNoGoalsToBeSolved = Lean.throwError (Lean.toMessageData "No goals to be solved")
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Elab.Tactic.Grind.instMonadBacktrackSavedStateGrindTacticM = { saveState := Lean.Elab.Tactic.Grind.saveState, restoreState := fun (b : Lean.Elab.Tactic.Grind.SavedState) => b.restore }
Runs x with only the first unsolved goal as the goal.
Fails if there are no goal to be solved.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Runs tactic with only the first unsolved goal as the goal, and expects it leave no goals.
Fails if there are no goal to be solved.
Equations
- Lean.Elab.Tactic.Grind.focusAndDone tactic = Lean.Elab.Tactic.Grind.focus do let a ← tactic Lean.Elab.Tactic.Grind.done pure a
Instances For
Close the main goal using the given tactic. If it fails, log the error and admit
Equations
- One or more equations did not get rendered due to their size.
Instances For
Non-backtracking try/catch.
Equations
- Lean.Elab.Tactic.Grind.tryCatch x h = tryCatch x fun (ex : Lean.Exception) => h ex
Instances For
Backtracking try/catch. This is used for the MonadExcept instance for GrindTacticM.
Equations
- Lean.Elab.Tactic.Grind.tryCatchRestore x h = do let b ← Lean.saveState tryCatch x fun (ex : Lean.Exception) => do b.restore h ex
Instances For
Equations
- Lean.Elab.Tactic.Grind.instMonadExceptExceptionGrindTacticM = { throw := fun {α : Type} => throw, tryCatch := fun {α : Type} => Lean.Elab.Tactic.Grind.tryCatchRestore }
Execute x with error recovery disabled
Equations
- One or more equations did not get rendered due to their size.
Instances For
Like throwErrorAt, but, if recovery is enabled, logs the error instead.
Equations
- Lean.Elab.Tactic.Grind.throwOrLogErrorAt ref msg = do let __do_lift ← read if __do_lift.recover = true then Lean.logErrorAt ref msg else Lean.throwErrorAt ref msg
Instances For
Like throwError, but, if recovery is enabled, logs the error instead.
Equations
- Lean.Elab.Tactic.Grind.throwOrLogError msg = do let __do_lift ← Lean.getRef Lean.Elab.Tactic.Grind.throwOrLogErrorAt __do_lift msg
Instances For
Equations
- Lean.Elab.Tactic.Grind.orElse x y = tryCatch (Lean.Elab.Tactic.Grind.withoutRecover x) fun (x : Lean.Exception) => y ()
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Save the current tactic state for a token stx.
This method is a no-op if stx has no position information.
We use this method to save the tactic state at punctuation such as ;
Equations
Instances For
Elaborate x with stx on the macro stack
Equations
- One or more equations did not get rendered due to their size.
Instances For
Adapt a syntax transformation to a regular tactic evaluator.
Equations
- Lean.Elab.Tactic.Grind.adaptExpander exp stx = do let stx' ← exp stx Lean.Elab.Tactic.Grind.withMacroExpansion stx stx' (Lean.Elab.Tactic.Grind.evalGrindTactic stx')
Instances For
Return the first goal.
Equations
- Lean.Elab.Tactic.Grind.getMainGoal = do let __do_lift ← Lean.Elab.Tactic.Grind.getGoals Lean.Elab.Tactic.Grind.getMainGoal.loop✝ __do_lift
Instances For
Execute x using the main goal local context and instances
Equations
- Lean.Elab.Tactic.Grind.withMainContext x = do let __do_lift ← Lean.Elab.Tactic.Grind.getMainGoal __do_lift.mvarId.withContext x
Instances For
Equations
- Lean.Elab.Tactic.Grind.tryTactic? tac = tryCatch (do let __do_lift ← tac pure (some __do_lift)) fun (x : Lean.Exception) => pure none
Instances For
Equations
- Lean.Elab.Tactic.Grind.tryTactic tac = tryCatch (do discard tac pure true) fun (x : Lean.Exception) => pure false
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
- Lean.Elab.Tactic.Grind.mkEvalTactic params = do let __do_lift ← read liftM (Lean.Elab.Tactic.Grind.mkEvalTactic' __do_lift.elaborator params)
Instances For
Equations
- One or more equations did not get rendered due to their size.