don't be so aggresive for a public test function and raise only BAD_THM instead of ERROR
authorkuncar
Mon, 24 Feb 2014 18:12:39 +0100
changeset 55721 1c2cfc06c96a
parent 55720 f3a2931a6656
child 55722 b6ed5f896ce9
don't be so aggresive for a public test function and raise only BAD_THM instead of ERROR
src/Pure/Isar/code.ML
--- a/src/Pure/Isar/code.ML	Mon Feb 24 18:12:39 2014 +0100
+++ b/src/Pure/Isar/code.ML	Mon Feb 24 18:12:39 2014 +0100
@@ -548,7 +548,7 @@
       else error ("Type arguments do not satisfy sort constraints of abstype certificate.");
   in (thm, tyco) end;
 
-fun assert_eqn thy = error_thm (gen_assert_eqn thy true) thy;
+fun assert_eqn thy = gen_assert_eqn thy true;
 
 fun meta_rewrite thy = Local_Defs.meta_rewrite_rule (Proof_Context.init_global thy);
 
@@ -752,7 +752,7 @@
       let
         val thy = Proof_Context.theory_of ctxt;
         val eqns = burrow_fst (canonize_thms thy) raw_eqns;
-        val _ = map (assert_eqn thy) eqns;
+        val _ = map (error_thm (assert_eqn thy) thy) eqns;
         val (thms, propers) = split_list eqns;
         val _ = map (fn thm => if c = const_eqn thy thm then ()
           else error ("Wrong head of code equation,\nexpected constant "