src/Pure/Isar/toplevel.ML
changeset 28394 b9c8e3a12a98
parent 28105 44054657ea56
child 28425 25d6099179a6
equal deleted inserted replaced
28393:30ba169e8c45 28394:b9c8e3a12a98
   107 (* local theory wrappers *)
   107 (* local theory wrappers *)
   108 
   108 
   109 type generic_theory = Context.generic;    (*theory or local_theory*)
   109 type generic_theory = Context.generic;    (*theory or local_theory*)
   110 
   110 
   111 val loc_init = TheoryTarget.context;
   111 val loc_init = TheoryTarget.context;
   112 val loc_exit = ProofContext.theory_of o LocalTheory.exit;
   112 val loc_exit = LocalTheory.exit_global;
   113 
   113 
   114 fun loc_begin loc (Context.Theory thy) = loc_init (the_default "-" loc) thy
   114 fun loc_begin loc (Context.Theory thy) = loc_init (the_default "-" loc) thy
   115   | loc_begin NONE (Context.Proof lthy) = lthy
   115   | loc_begin NONE (Context.Proof lthy) = lthy
   116   | loc_begin (SOME loc) (Context.Proof lthy) = loc_init loc (loc_exit lthy);
   116   | loc_begin (SOME loc) (Context.Proof lthy) = loc_init loc (loc_exit lthy);
   117 
   117