File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/Lean/Elab/Tactic/Grind Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,11 @@ import Lean.Elab.Tactic.Grind.ShowState
2828import Lean.Elab.SetOption
2929namespace Lean.Elab.Tactic.Grind
3030
31- def showStateAt (ref : Syntax) (filter : Filter) : GrindTacticM Unit := do
32- if let goalBefore :: _ := (← getGoals) then
33- withRef ref <| goalBefore.withContext <| showState filter (isSilent := true )
31+ def showStateAt (ref : Syntax) (filter? : Option (TSyntax `grind_filter)) : GrindTacticM Unit := do
32+ if let goal :: _ := (← getGoals) then
33+ withRef ref <| goal.withContext do
34+ let filter ← elabFilter filter?
35+ showState filter (isSilent := true )
3436 else
3537 logAt ref (severity := .information) (isSilent := true ) "no grind state"
3638
@@ -40,10 +42,9 @@ def evalSepTactics (stx : Syntax) : GrindTacticM Unit := do
4042 match arg with
4143 | `(Parser.Tactic.Grind.grindStep| $tac:grind) => evalGrindTactic tac
4244 | `(Parser.Tactic.Grind.grindStep| $tac:grind | $[$filter?]?) =>
43- let filter ← elabFilter filter?
44- showStateAt arg filter
45+ showStateAt arg filter?
4546 evalGrindTactic tac
46- showStateAt arg[1 ] filter
47+ showStateAt arg[1 ] filter?
4748 | _ => throwUnsupportedSyntax
4849 else
4950 saveTacticInfoForToken arg
You can’t perform that action at this time.
0 commit comments