src/Pure/theory.ML
changeset 24763 da4a9986eccd
parent 24708 d9b00117365e
child 24966 70111480b84b
--- a/src/Pure/theory.ML	Sat Sep 29 21:39:47 2007 +0200
+++ b/src/Pure/theory.ML	Sat Sep 29 21:39:48 2007 +0200
@@ -270,10 +270,8 @@
 
 fun check_overloading thy overloaded (c, T) =
   let
-    val declT =
-      (case Sign.const_constraint thy c of
-        NONE => error ("Undeclared constant " ^ quote c)
-      | SOME declT => declT);
+    val declT = Sign.the_const_constraint thy c
+      handle TYPE (msg, _, _) => error msg;
     val T' = Logic.varifyT T;
 
     fun message txt =