certify: check_stale;
authorwenzelm
Wed, 22 Oct 1997 11:36:29 +0200
changeset 3969 9c742951a923
parent 3968 ec138de716d9
child 3970 e1843233c694
certify: check_stale;
src/Pure/sign.ML
--- a/src/Pure/sign.ML	Tue Oct 21 18:15:43 1997 +0200
+++ b/src/Pure/sign.ML	Wed Oct 22 11:36:29 1997 +0200
@@ -508,9 +508,10 @@
       handle ERROR => err_in_type str);
   
 (*read and certify typ wrt a signature*)
-fun read_typ (Sg {tsig, syn, spaces, ...}, def_sort) str =
-  Type.cert_typ tsig (read_raw_typ syn tsig spaces def_sort str)
-    handle TYPE (msg, _, _) => (error_msg msg; err_in_type str);
+fun read_typ (sg as Sg {tsig, syn, spaces, ...}, def_sort) str =
+  (check_stale sg;
+    Type.cert_typ tsig (read_raw_typ syn tsig spaces def_sort str)
+      handle TYPE (msg, _, _) => (error_msg msg; err_in_type str));
 
 
 
@@ -565,6 +566,8 @@
 
 fun certify_term (sg as Sg {tsig, ...}) tm =
   let
+    val _ = check_stale sg;
+
     fun valid_const a T =
       (case const_type sg a of
         Some U => Type.typ_instance (tsig, T, U)