fix: Tactic.orelse was using the wrong try ... catch ...
This commit is contained in:
parent
bfba03c6e1
commit
27c495c198
1 changed files with 4 additions and 4 deletions
|
|
@ -51,15 +51,15 @@ def BacktrackableState.restore (b : BacktrackableState) : TacticM Unit := do
|
|||
let b ← saveBacktrackableState
|
||||
try x catch ex => b.restore; h ex
|
||||
|
||||
@[inline] protected def orelse {α} (x y : TacticM α) : TacticM α := do
|
||||
try x catch _ => y
|
||||
|
||||
instance : MonadExcept Exception TacticM := {
|
||||
throw := throw,
|
||||
tryCatch := Tactic.tryCatch
|
||||
}
|
||||
|
||||
instance {α} : OrElse (TacticM α) := ⟨Tactic.orelse⟩
|
||||
@[inline] protected def orElse {α} (x y : TacticM α) : TacticM α := do
|
||||
try x catch _ => y
|
||||
|
||||
instance {α} : OrElse (TacticM α) := ⟨Tactic.orElse⟩
|
||||
|
||||
structure SavedState :=
|
||||
(core : Core.State)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue