actually handle Type.TYPE_MATCH, not arbitrary exceptions;
authorwenzelm
Fri, 24 Sep 2010 15:30:30 +0200
changeset 39685 d8071cddb877
parent 39684 6814630157b9
child 39686 8b9f971ace20
actually handle Type.TYPE_MATCH, not arbitrary exceptions;
src/HOL/Matrix/Compute_Oracle/linker.ML
src/HOL/Tools/Predicate_Compile/predicate_compile_core.ML
--- a/src/HOL/Matrix/Compute_Oracle/linker.ML	Fri Sep 24 15:14:55 2010 +0200
+++ b/src/HOL/Matrix/Compute_Oracle/linker.ML	Fri Sep 24 15:30:30 2010 +0200
@@ -166,7 +166,7 @@
                               else case Consttab.lookup insttab constant of
                                        SOME _ => instantiations
                                      | NONE => ((constant', (constant, Sign.typ_match thy (ty', ty) empty_subst))::instantiations
-                                                handle TYPE_MATCH => instantiations))
+                                                handle Type.TYPE_MATCH => instantiations))
                           ctab instantiations
         val instantiations = fold calc_instantiations cs []
         (*val _ = writeln ("instantiations = "^(makestring (length instantiations)))*)
--- a/src/HOL/Tools/Predicate_Compile/predicate_compile_core.ML	Fri Sep 24 15:14:55 2010 +0200
+++ b/src/HOL/Tools/Predicate_Compile/predicate_compile_core.ML	Fri Sep 24 15:30:30 2010 +0200
@@ -491,7 +491,7 @@
       fun subst_of (pred', pred) =
         let
           val subst = Sign.typ_match thy (fastype_of pred', fastype_of pred) Vartab.empty
-            handle TYPE_MATCH => error ("Type mismatch of predicate " ^ fst (dest_Const pred)
+            handle Type.TYPE_MATCH => error ("Type mismatch of predicate " ^ fst (dest_Const pred)
             ^ " (trying to match " ^ Syntax.string_of_typ ctxt (fastype_of pred')
             ^ " and " ^ Syntax.string_of_typ ctxt (fastype_of pred) ^ ")"
             ^ " in " ^ Display.string_of_thm ctxt th)