removed "duplicate" warning from store_thm_db;
authorclasohm
Wed, 25 Oct 1995 13:41:45 +0100
changeset 1308 396ef8aa37b7
parent 1307 63a5788774f7
child 1309 890303a7bbc8
removed "duplicate" warning from store_thm_db; changed place where store_thm_db is called for a theory's axioms
src/Pure/Thy/thm_database.ML
src/Pure/Thy/thy_read.ML
--- a/src/Pure/Thy/thm_database.ML	Wed Oct 25 12:53:53 1995 +0100
+++ b/src/Pure/Thy/thm_database.ML	Wed Oct 25 13:41:45 1995 +0100
@@ -80,10 +80,7 @@
                 else case find_first (fn (_, (n, _)) => n = name) old_thms of
                        Some (_, (_, t)) => eq_thm (t, thm)
                      | None => false
-            in if duplicate then
-                 (writeln ("Warning: Theorem database already contains copy of\
-                           \ theorem " ^ quote name);
-                  None)
+            in if duplicate then None
                else update_db true
                       cs (Symtab.update ((c, tagged_thm :: old_thms), result))
             end;
--- a/src/Pure/Thy/thy_read.ML	Wed Oct 25 12:53:53 1995 +0100
+++ b/src/Pure/Thy/thy_read.ML	Wed Oct 25 13:41:45 1995 +0100
@@ -627,6 +627,17 @@
           use (out_name tname);
           save_thy_ss ();
 
+          (*Store axioms of theory
+            (but only if it's not a copy of an older theory)*)
+          let val parents = parents_of tname;
+              val this_thy = theory_of tname;
+              val axioms =
+                if length parents = 1
+                   andalso Sign.eq_sg (sign_of (theory_of (hd parents)),
+                                       sign_of this_thy) then []
+                else axioms_of this_thy;
+          in map store_thm_db axioms end;
+
           if not (!delete_tmpfiles) then ()
           else delete_file (out_name tname);
 
@@ -646,17 +657,6 @@
        use_string
          ["val _ = store_theory (" ^ tname ^ ".thy, " ^ quote tname ^ ");"];
 
-       (*Store axioms of theory
-         (but only if it's not a copy of an older theory)*)
-       let val parents = parents_of tname;
-           val this_thy = theory_of tname;
-           val axioms =
-             if length parents = 1
-                andalso Sign.eq_sg (sign_of (theory_of (hd parents)),
-                                    sign_of this_thy) then []
-             else axioms_of this_thy;
-       in map store_thm_db axioms end;
-
        (*Add theory to list of all loaded theories (for 00-chart.html)
          and add it to its parents' sub-charts*)
        if !make_html then