--- a/src/Pure/Isar/toplevel.ML Sat Aug 13 20:49:41 2011 +0200
+++ b/src/Pure/Isar/toplevel.ML Sat Aug 13 21:06:01 2011 +0200
@@ -185,8 +185,8 @@
| _ => raise UNDEF);
fun end_theory _ (State (NONE, SOME (Theory (Context.Theory thy, _)))) = thy
- | end_theory pos (State (SOME _, _)) = error ("Unfinished theory " ^ Position.str_of pos)
- | end_theory pos (State (NONE, NONE)) = error ("Missing theory " ^ Position.str_of pos);
+ | end_theory pos (State (NONE, _)) = error ("Missing theory " ^ Position.str_of pos)
+ | end_theory pos (State (SOME _, _)) = error ("Unfinished theory " ^ Position.str_of pos);
(* print state *)