src/Pure/Isar/isar_thy.ML
changeset 6483 3e5d450c2b31
parent 6404 2daaf2943c79
child 6501 392333eb31cb
equal deleted inserted replaced
6482:324a4051ff7b 6483:3e5d450c2b31
   335 fun theory spec = Toplevel.init_theory (bg_theory spec) en_theory;
   335 fun theory spec = Toplevel.init_theory (bg_theory spec) en_theory;
   336 
   336 
   337 
   337 
   338 (* context switch *)
   338 (* context switch *)
   339 
   339 
   340 fun switch_theory load name =
   340 fun switch_theory load s =
   341   Toplevel.init_theory
   341   Toplevel.init_theory (fn () => (the (#2 (Context.pass None load s)))) (K ());
   342     (fn () => (Context.save load name; ThyInfo.get_theory name)) (K ());
       
   343 
   342 
   344 val context = switch_theory ThyInfo.use_thy;
   343 val context = switch_theory ThyInfo.use_thy;
   345 val update_context = switch_theory ThyInfo.update_thy;
   344 val update_context = switch_theory ThyInfo.update_thy;
   346 
   345 
   347 
   346