7 |
7 |
8 signature SESSION = |
8 signature SESSION = |
9 sig |
9 sig |
10 val name: unit -> string |
10 val name: unit -> string |
11 val welcome: unit -> string |
11 val welcome: unit -> string |
12 val use_dir: string -> bool -> string list -> bool -> bool -> string -> bool -> |
12 val use_dir: string -> bool -> string list -> bool -> bool -> string -> bool -> string list -> |
13 string list -> string -> string -> bool * string -> string -> int -> bool -> int -> unit |
13 string -> string -> bool * string -> string -> int -> bool -> int -> bool -> unit |
14 val finish: unit -> unit |
14 val finish: unit -> unit |
15 end; |
15 end; |
16 |
16 |
17 structure Session: SESSION = |
17 structure Session: SESSION = |
18 struct |
18 struct |
77 |
77 |
78 fun dumping (_, "") = NONE |
78 fun dumping (_, "") = NONE |
79 | dumping (cp, path) = SOME (cp, Path.explode path); |
79 | dumping (cp, path) = SOME (cp, Path.explode path); |
80 |
80 |
81 fun use_dir root build modes reset info doc doc_graph doc_versions |
81 fun use_dir root build modes reset info doc doc_graph doc_versions |
82 parent name dump rpath level verbose max_threads = |
82 parent name dump rpath level verbose max_threads trace_threads = |
83 ((fn () => |
83 ((fn () => |
84 (init reset parent name; |
84 (init reset parent name; |
85 Present.init build info doc doc_graph doc_versions (path ()) name |
85 Present.init build info doc doc_graph doc_versions (path ()) name |
86 (dumping dump) (get_rpath rpath) verbose (map ThyInfo.theory (ThyInfo.names ())); |
86 (dumping dump) (get_rpath rpath) verbose (map ThyInfo.theory (ThyInfo.names ())); |
87 Secure.use_noncritical root; |
87 Secure.use_noncritical root; |
88 finish ())) |
88 finish ())) |
89 |> setmp_noncritical Proofterm.proofs level |
89 |> setmp_noncritical Proofterm.proofs level |
90 |> setmp_noncritical print_mode (modes @ ! print_mode) |
90 |> setmp_noncritical print_mode (modes @ ! print_mode) |
|
91 |> setmp_noncritical Multithreading.trace trace_threads |
91 |> setmp_noncritical Multithreading.max_threads |
92 |> setmp_noncritical Multithreading.max_threads |
92 (if Multithreading.available then max_threads |
93 (if Multithreading.available then max_threads |
93 else (if max_threads = 1 then () else warning "Multithreading support unavailable"; 1))) () |
94 else (if max_threads = 1 then () else warning "Multithreading support unavailable"; 1))) () |
94 handle exn => (Output.error_msg (Toplevel.exn_message exn); exit 1); |
95 handle exn => (Output.error_msg (Toplevel.exn_message exn); exit 1); |
95 |
96 |