# HG changeset patch # User wenzelm # Date 1169298556 -3600 # Node ID fa8960e165a67bf5d0a735da16103a364c22e1ba # Parent 0906fd95e0b5fd54a855a1007fa11457b36a74b0 added is_finished_thy; diff -r 0906fd95e0b5 -r fa8960e165a6 src/Pure/context.ML --- 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 *)