src/Pure/ROOT.ML
changeset 48732 f04320479ff9
parent 48681 181b91e1d1c1
child 48771 2ea997196d04
equal deleted inserted replaced
48731:a45ba78abcc1 48732:f04320479ff9
   301 
   301 
   302 use "ProofGeneral/proof_general_pgip.ML";
   302 use "ProofGeneral/proof_general_pgip.ML";
   303 use "ProofGeneral/proof_general_emacs.ML";
   303 use "ProofGeneral/proof_general_emacs.ML";
   304 
   304 
   305 
   305 
   306 use "pure_setup.ML";
   306 (* ML toplevel use commands *)
       
   307 
       
   308 fun use name = Toplevel.program (fn () => Thy_Load.use_ml (Path.explode name));
       
   309 
       
   310 fun use_thys name = Toplevel.program (fn () => Thy_Info.use_thys name);
       
   311 fun use_thy name = Toplevel.program (fn () => Thy_Info.use_thy name);
       
   312 
       
   313 
       
   314 (* the Pure theory *)
       
   315 
       
   316 val _ =
       
   317   Outer_Syntax.command
       
   318     (("theory", Keyword.tag_theory Keyword.thy_begin), Position.none) "begin theory context"
       
   319     (Thy_Header.args >> (fn header =>
       
   320       Toplevel.print o
       
   321         Toplevel.init_theory
       
   322           (fn () => Thy_Info.toplevel_begin_theory (Thy_Load.get_master_path ()) header)));
       
   323 
       
   324 Unsynchronized.setmp Multithreading.max_threads 1
       
   325   use_thy "Pure";
       
   326 Context.set_thread_data NONE;
       
   327 
       
   328 structure Pure = struct val thy = Thy_Info.get_theory "Pure" end;
       
   329 
       
   330 
       
   331 (* ML toplevel pretty printing *)
       
   332 
       
   333 toplevel_pp ["Pretty", "T"] "(fn _: Pretty.T => Pretty.str \"<pretty>\")";
       
   334 toplevel_pp ["Task_Queue", "task"] "Pretty.str o Task_Queue.str_of_task";
       
   335 toplevel_pp ["Task_Queue", "group"] "Pretty.str o Task_Queue.str_of_group";
       
   336 toplevel_pp ["Position", "T"] "Pretty.position";
       
   337 toplevel_pp ["Binding", "binding"] "Pretty.str o Binding.print";
       
   338 toplevel_pp ["Thm", "thm"] "Proof_Display.pp_thm";
       
   339 toplevel_pp ["Thm", "cterm"] "Proof_Display.pp_cterm";
       
   340 toplevel_pp ["Thm", "ctyp"] "Proof_Display.pp_ctyp";
       
   341 toplevel_pp ["typ"] "Proof_Display.pp_typ Pure.thy";
       
   342 toplevel_pp ["Context", "theory"] "Context.pretty_thy";
       
   343 toplevel_pp ["Context", "theory_ref"] "Context.pretty_thy o Theory.deref";
       
   344 toplevel_pp ["Context", "Proof", "context"] "Proof_Display.pp_context";
       
   345 toplevel_pp ["Ast", "ast"] "Ast.pretty_ast";
       
   346 toplevel_pp ["Path", "T"] "Path.pretty";
       
   347 toplevel_pp ["SHA1", "digest"] "Pretty.str o quote o SHA1.rep";
       
   348 toplevel_pp ["Proof", "state"] "(fn _: Proof.state => Pretty.str \"<Proof.state>\")";
       
   349 toplevel_pp ["Toplevel", "state"] "Toplevel.pretty_abstract";
       
   350 
       
   351 if ML_System.is_polyml then use "ML/install_pp_polyml.ML" else ();
       
   352 
       
   353 
       
   354 (* misc *)
       
   355 
       
   356 val cd = File.cd o Path.explode;
       
   357 
       
   358 Proofterm.proofs := 0;
   307 
   359 
   308 use "ProofGeneral/pgip_tests.ML";
   360 use "ProofGeneral/pgip_tests.ML";
   309 
   361