src/Pure/ROOT.ML
changeset 48732 f04320479ff9
parent 48681 181b91e1d1c1
child 48771 2ea997196d04
     1.1 --- a/src/Pure/ROOT.ML	Wed Aug 08 12:33:40 2012 +0200
     1.2 +++ b/src/Pure/ROOT.ML	Wed Aug 08 12:38:41 2012 +0200
     1.3 @@ -303,7 +303,59 @@
     1.4  use "ProofGeneral/proof_general_emacs.ML";
     1.5  
     1.6  
     1.7 -use "pure_setup.ML";
     1.8 +(* ML toplevel use commands *)
     1.9 +
    1.10 +fun use name = Toplevel.program (fn () => Thy_Load.use_ml (Path.explode name));
    1.11 +
    1.12 +fun use_thys name = Toplevel.program (fn () => Thy_Info.use_thys name);
    1.13 +fun use_thy name = Toplevel.program (fn () => Thy_Info.use_thy name);
    1.14 +
    1.15 +
    1.16 +(* the Pure theory *)
    1.17 +
    1.18 +val _ =
    1.19 +  Outer_Syntax.command
    1.20 +    (("theory", Keyword.tag_theory Keyword.thy_begin), Position.none) "begin theory context"
    1.21 +    (Thy_Header.args >> (fn header =>
    1.22 +      Toplevel.print o
    1.23 +        Toplevel.init_theory
    1.24 +          (fn () => Thy_Info.toplevel_begin_theory (Thy_Load.get_master_path ()) header)));
    1.25 +
    1.26 +Unsynchronized.setmp Multithreading.max_threads 1
    1.27 +  use_thy "Pure";
    1.28 +Context.set_thread_data NONE;
    1.29 +
    1.30 +structure Pure = struct val thy = Thy_Info.get_theory "Pure" end;
    1.31 +
    1.32 +
    1.33 +(* ML toplevel pretty printing *)
    1.34 +
    1.35 +toplevel_pp ["Pretty", "T"] "(fn _: Pretty.T => Pretty.str \"<pretty>\")";
    1.36 +toplevel_pp ["Task_Queue", "task"] "Pretty.str o Task_Queue.str_of_task";
    1.37 +toplevel_pp ["Task_Queue", "group"] "Pretty.str o Task_Queue.str_of_group";
    1.38 +toplevel_pp ["Position", "T"] "Pretty.position";
    1.39 +toplevel_pp ["Binding", "binding"] "Pretty.str o Binding.print";
    1.40 +toplevel_pp ["Thm", "thm"] "Proof_Display.pp_thm";
    1.41 +toplevel_pp ["Thm", "cterm"] "Proof_Display.pp_cterm";
    1.42 +toplevel_pp ["Thm", "ctyp"] "Proof_Display.pp_ctyp";
    1.43 +toplevel_pp ["typ"] "Proof_Display.pp_typ Pure.thy";
    1.44 +toplevel_pp ["Context", "theory"] "Context.pretty_thy";
    1.45 +toplevel_pp ["Context", "theory_ref"] "Context.pretty_thy o Theory.deref";
    1.46 +toplevel_pp ["Context", "Proof", "context"] "Proof_Display.pp_context";
    1.47 +toplevel_pp ["Ast", "ast"] "Ast.pretty_ast";
    1.48 +toplevel_pp ["Path", "T"] "Path.pretty";
    1.49 +toplevel_pp ["SHA1", "digest"] "Pretty.str o quote o SHA1.rep";
    1.50 +toplevel_pp ["Proof", "state"] "(fn _: Proof.state => Pretty.str \"<Proof.state>\")";
    1.51 +toplevel_pp ["Toplevel", "state"] "Toplevel.pretty_abstract";
    1.52 +
    1.53 +if ML_System.is_polyml then use "ML/install_pp_polyml.ML" else ();
    1.54 +
    1.55 +
    1.56 +(* misc *)
    1.57 +
    1.58 +val cd = File.cd o Path.explode;
    1.59 +
    1.60 +Proofterm.proofs := 0;
    1.61  
    1.62  use "ProofGeneral/pgip_tests.ML";
    1.63