dup_elim: use try to handle general exn;
authorwenzelm
Sat, 10 Jul 1999 21:46:15 +0200
changeset 6967 a3c163ed1e04
parent 6966 cfa87aef9ccd
child 6968 7f2977e96a5c
dup_elim: use try to handle general exn;
src/Provers/classical.ML
--- a/src/Provers/classical.ML	Sat Jul 10 21:44:26 1999 +0200
+++ b/src/Provers/classical.ML	Sat Jul 10 21:46:15 1999 +0200
@@ -252,10 +252,12 @@
 (*Duplication of hazardous rules, for complete provers*)
 fun dup_intr th = zero_var_indexes (th RS classical);
 
-fun dup_elim th = 
-    th RSN (2, revcut_rl) |> assumption 2 |> Seq.hd |> 
-    rule_by_tactic (TRYALL (etac revcut_rl))
-    handle _ => error ("Bad format for elimination rule\n" ^ string_of_thm th);
+fun dup_elim th =
+  (case try
+      (rule_by_tactic (TRYALL (etac revcut_rl)))
+      (th RSN (2, revcut_rl) |> assumption 2 |> Seq.hd) of
+    Some th' => th'
+  | _ => error ("Bad format for elimination rule\n" ^ string_of_thm th));
 
 
 (**** Classical rule sets ****)