--- a/src/Pure/context.ML Sat Jan 20 14:09:14 2007 +0100
+++ b/src/Pure/context.ML Sat Jan 20 14:09:16 2007 +0100
@@ -44,6 +44,7 @@
val copy_thy: theory -> theory
val checkpoint_thy: theory -> theory
val finish_thy: theory -> theory
+ val is_finished_thy: theory -> bool
val theory_data_of: theory -> string list
val pre_pure_thy: theory
val begin_thy: (theory -> Pretty.pp) -> string -> theory list -> theory
@@ -405,6 +406,9 @@
val _ = List.app (fn r => r := thy'') rs;
in thy'' end;
+fun is_finished_thy thy =
+ (check_thy thy; not (is_draft thy) andalso #version (history_of thy) = 0);
+
(* theory data *)