equal
deleted
inserted
replaced
2 Author: Makarius |
2 Author: Makarius |
3 |
3 |
4 Pure theory and ML toplevel setup. |
4 Pure theory and ML toplevel setup. |
5 *) |
5 *) |
6 |
6 |
7 (* the Pure theories *) |
7 (* the Pure theory *) |
8 |
8 |
9 Context.>> (Context.map_theory |
9 Context.>> (Context.map_theory |
10 (Outer_Syntax.process_file (Path.explode "Pure.thy") #> |
10 (Outer_Syntax.process_file (Path.explode "Pure.thy") #> |
11 Theory.end_theory)); |
11 Theory.end_theory)); |
|
12 |
12 structure Pure = struct val thy = ML_Context.the_global_context () end; |
13 structure Pure = struct val thy = ML_Context.the_global_context () end; |
|
14 |
13 Context.set_thread_data NONE; |
15 Context.set_thread_data NONE; |
14 Thy_Info.register_theory Pure.thy; |
16 Thy_Info.register_thy Pure.thy; |
15 |
17 |
16 |
18 |
17 (* ML toplevel pretty printing *) |
19 (* ML toplevel pretty printing *) |
18 |
20 |
19 if String.isPrefix "smlnj" ml_system then () |
21 if String.isPrefix "smlnj" ml_system then () |
49 else (); |
51 else (); |
50 |
52 |
51 |
53 |
52 (* ML toplevel use commands *) |
54 (* ML toplevel use commands *) |
53 |
55 |
54 fun use name = Toplevel.program (fn () => Thy_Info.use name); |
56 fun use name = Toplevel.program (fn () => Thy_Load.use_ml (Path.explode name)); |
|
57 |
55 fun use_thys name = Toplevel.program (fn () => Thy_Info.use_thys name); |
58 fun use_thys name = Toplevel.program (fn () => Thy_Info.use_thys name); |
56 fun use_thy name = Toplevel.program (fn () => Thy_Info.use_thy name); |
59 fun use_thy name = Toplevel.program (fn () => Thy_Info.use_thy name); |
57 |
60 |
58 |
61 |
59 (* misc *) |
62 (* misc *) |