src/Pure/Isar/toplevel.ML
changeset 71023 35a8e15b7e03
parent 70398 725438ceae7c
child 72434 cc27cf7e51c6
equal deleted inserted replaced
71022:6504ea98623c 71023:35a8e15b7e03
   292         State (node_presentation (Theory (Context.Theory (f ()))), NONE)) ()
   292         State (node_presentation (Theory (Context.Theory (f ()))), NONE)) ()
   293   | (Exit, node as Theory (Context.Theory thy)) =>
   293   | (Exit, node as Theory (Context.Theory thy)) =>
   294       let
   294       let
   295         val State ((node', pr_ctxt), _) =
   295         val State ((node', pr_ctxt), _) =
   296           node |> apply
   296           node |> apply
   297             (fn _ => node_presentation (Theory (Context.Theory (Theory.end_theory thy))))
   297             (fn _ =>
       
   298               node_presentation
       
   299                 (Theory (Context.Theory (tap Thm.expose_theory (Theory.end_theory thy)))))
   298             (K ());
   300             (K ());
   299       in State ((Toplevel, pr_ctxt), get_theory node') end
   301       in State ((Toplevel, pr_ctxt), get_theory node') end
   300   | (Keep f, node) =>
   302   | (Keep f, node) =>
   301       Runtime.controlled_execution (try generic_theory_of state)
   303       Runtime.controlled_execution (try generic_theory_of state)
   302         (fn () => (f int state; State (node_presentation node, previous_theory_of state))) ()
   304         (fn () => (f int state; State (node_presentation node, previous_theory_of state))) ()