added is_finished_thy;
authorwenzelm
Sat Jan 20 14:09:16 2007 +0100 (2007-01-20)
changeset 22131fa8960e165a6
parent 22130 0906fd95e0b5
child 22132 0f26cd597193
added is_finished_thy;
src/Pure/context.ML
     1.1 --- a/src/Pure/context.ML	Sat Jan 20 14:09:14 2007 +0100
     1.2 +++ b/src/Pure/context.ML	Sat Jan 20 14:09:16 2007 +0100
     1.3 @@ -44,6 +44,7 @@
     1.4    val copy_thy: theory -> theory
     1.5    val checkpoint_thy: theory -> theory
     1.6    val finish_thy: theory -> theory
     1.7 +  val is_finished_thy: theory -> bool
     1.8    val theory_data_of: theory -> string list
     1.9    val pre_pure_thy: theory
    1.10    val begin_thy: (theory -> Pretty.pp) -> string -> theory list -> theory
    1.11 @@ -405,6 +406,9 @@
    1.12      val _ = List.app (fn r => r := thy'') rs;
    1.13    in thy'' end;
    1.14  
    1.15 +fun is_finished_thy thy =
    1.16 +  (check_thy thy; not (is_draft thy) andalso #version (history_of thy) = 0);
    1.17 +
    1.18  
    1.19  (* theory data *)
    1.20