src/Pure/Isar/outer_syntax.ML
changeset 22086 cf6019fece63
parent 21967 dcb32fe97503
child 22120 8424ef945cb5
equal deleted inserted replaced
22085:c138cfd500f7 22086:cf6019fece63
   299     timeit (fn () =>
   299     timeit (fn () =>
   300      (writeln ("\n**** Starting theory " ^ quote name ^ " ****");
   300      (writeln ("\n**** Starting theory " ^ quote name ^ " ****");
   301       run_thy name path;
   301       run_thy name path;
   302       writeln ("**** Finished theory " ^ quote name ^ " ****\n")))
   302       writeln ("**** Finished theory " ^ quote name ^ " ****\n")))
   303   else run_thy name path;
   303   else run_thy name path;
   304   Context.context (ThyInfo.get_theory name);
   304   Context.set_context (SOME (Context.Theory (ThyInfo.get_theory name)));
   305   if ml then try_ml_file name time else ());
   305   if ml then try_ml_file name time else ());
   306 
   306 
   307 end;
   307 end;
   308 
   308 
   309 
   309 
   311 (** the read-eval-print loop **)
   311 (** the read-eval-print loop **)
   312 
   312 
   313 (* main loop *)
   313 (* main loop *)
   314 
   314 
   315 fun gen_loop term no_pos =
   315 fun gen_loop term no_pos =
   316  (Context.reset_context ();
   316  (Context.set_context NONE;
   317   Toplevel.loop (isar term no_pos));
   317   Toplevel.loop (isar term no_pos));
   318 
   318 
   319 fun gen_main term no_pos =
   319 fun gen_main term no_pos =
   320  (Toplevel.init_state ();
   320  (Toplevel.init_state ();
   321   writeln (Session.welcome ());
   321   writeln (Session.welcome ());