Skip to content

Commit c2c6b1f

Browse files
committed
Prevent hard fails during failed proofs
1 parent 6f8de4a commit c2c6b1f

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Solver.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Ltac2 find_contradiction hyps_map: constr :=
177177
| name :: rest =>
178178
Control.plus (fun _=> try_contra hyps_map name) (fun _ => try_contras hyps_map rest)
179179
| [] =>
180-
Control.throw (Tactic_failure (Some (fprintf "No contradiction found")))
180+
Control.zero (Tactic_failure (Some (fprintf "No contradiction found")))
181181
end in
182182
try_contras hyps_map (List.map fst (FMap.bindings hyps_map)).
183183

Tests.v

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ Section Tests.
209209
strict_order lt.
210210
Qed.
211211

212+
(* make sure we can `try` failed solving *)
213+
Goal False.
214+
Proof.
215+
try (strict_order lt).
216+
Abort.
217+
212218
(* ---- Long chains ---- *)
213219

214220
(* 10-element chain *)

0 commit comments

Comments
 (0)