clarified presentation_state with provide presentation_context;
authorwenzelm
Tue, 09 Jan 2018 17:58:35 +0100
changeset 67390 a256051dd3d6
parent 67389 7e21d19e7ad7
child 67391 d55e52e25d9a
clarified presentation_state with provide presentation_context;
src/Pure/Isar/toplevel.ML
--- a/src/Pure/Isar/toplevel.ML	Tue Jan 09 17:40:25 2018 +0100
+++ b/src/Pure/Isar/toplevel.ML	Tue Jan 09 17:58:35 2018 +0100
@@ -8,7 +8,6 @@
 sig
   exception UNDEF
   type state
-  val generic_theory_toplevel: generic_theory -> state
   val theory_toplevel: theory -> state
   val toplevel: state
   val is_toplevel: state -> bool
@@ -122,8 +121,7 @@
 
 datatype state = State of node option * node option;  (*current, previous*)
 
-fun generic_theory_toplevel gthy = State (SOME (Theory (gthy, NONE)), NONE);
-val theory_toplevel = generic_theory_toplevel o Context.Theory;
+fun theory_toplevel thy = State (SOME (Theory (Context.Theory thy, NONE)), NONE);
 
 val toplevel = State (NONE, NONE);
 
@@ -193,7 +191,7 @@
 
 fun presentation_state ctxt =
   (case Presentation_State.get ctxt of
-    NONE => generic_theory_toplevel (Context.Proof ctxt)
+    NONE => State (SOME (Theory (Context.Proof ctxt, SOME ctxt)), NONE)
   | SOME state => state);