Skip to content

Commit

Permalink
feat: make classical tactic incremental (#6575)
Browse files Browse the repository at this point in the history
This PR ensures tactics are evaluated incrementally in the body of
`classical`.
  • Loading branch information
Kha authored Jan 8, 2025
1 parent 680ede7 commit 034bc26
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Lean/Elab/Tactic/Classical.lean
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ def classical [Monad m] [MonadEnv m] [MonadFinally m] [MonadLiftT MetaM m] (t :
finally
modifyEnv Meta.instanceExtension.popScope

@[builtin_tactic Lean.Parser.Tactic.classical]
def evalClassical : Tactic := fun stx => do
match stx with
| `(tactic| classical $tacs:tacticSeq) =>
classical <| Elab.Tactic.evalTactic tacs
| _ => throwUnsupportedSyntax
@[builtin_tactic Lean.Parser.Tactic.classical, builtin_incremental]
def evalClassical : Tactic := fun stx =>
classical <| Term.withNarrowedArgTacticReuse (argIdx := 1) Elab.Tactic.evalTactic stx

end Lean.Elab.Tactic

0 comments on commit 034bc26

Please sign in to comment.