equal
deleted
inserted
replaced
21 val load_current: theory -> bool |
21 val load_current: theory -> bool |
22 val use_ml: Path.T -> unit |
22 val use_ml: Path.T -> unit |
23 val exec_ml: Path.T -> generic_theory -> generic_theory |
23 val exec_ml: Path.T -> generic_theory -> generic_theory |
24 val begin_theory: Path.T -> Thy_Header.header -> theory list -> theory |
24 val begin_theory: Path.T -> Thy_Header.header -> theory list -> theory |
25 val load_thy: (Toplevel.transition -> Time.time) -> int -> Path.T -> Thy_Header.header -> |
25 val load_thy: (Toplevel.transition -> Time.time) -> int -> Path.T -> Thy_Header.header -> |
26 Position.T -> string -> theory list -> theory * unit future |
26 Position.T -> string -> theory list -> theory * (unit -> unit) * int |
27 val set_master_path: Path.T -> unit |
27 val set_master_path: Path.T -> unit |
28 val get_master_path: unit -> Path.T |
28 val get_master_path: unit -> Path.T |
29 end; |
29 end; |
30 |
30 |
31 structure Thy_Load: THY_LOAD = |
31 structure Thy_Load: THY_LOAD = |
256 |
256 |
257 val _ = if time then writeln ("\n**** Starting theory " ^ quote name ^ " ****") else (); |
257 val _ = if time then writeln ("\n**** Starting theory " ^ quote name ^ " ****") else (); |
258 val (results, thy) = cond_timeit time "" (fn () => excursion last_timing init elements); |
258 val (results, thy) = cond_timeit time "" (fn () => excursion last_timing init elements); |
259 val _ = if time then writeln ("**** Finished theory " ^ quote name ^ " ****\n") else (); |
259 val _ = if time then writeln ("**** Finished theory " ^ quote name ^ " ****\n") else (); |
260 |
260 |
261 val present = |
261 fun present () = |
262 Future.flat results |> Future.map (fn res0 => |
262 let |
263 let |
263 val res = filter_out (Toplevel.is_ignored o #1) (flat (Future.joins results)); |
264 val res = filter_out (Toplevel.is_ignored o #1) res0; |
264 val ((minor, _), outer_syntax) = Outer_Syntax.get_syntax (); |
265 val ((minor, _), outer_syntax) = Outer_Syntax.get_syntax (); |
265 in |
266 in |
266 Thy_Output.present_thy minor Keyword.command_tags |
267 Thy_Output.present_thy minor Keyword.command_tags |
267 (Outer_Syntax.is_markup outer_syntax) res toks |
268 (Outer_Syntax.is_markup outer_syntax) res toks |
268 |> Buffer.content |
269 |> Buffer.content |
269 |> Present.theory_output name |
270 |> Present.theory_output name |
270 end; |
271 end); |
271 |
272 |
272 in (thy, present, size text) end; |
273 in (thy, present) end; |
|
274 |
273 |
275 |
274 |
276 (* document antiquotation *) |
275 (* document antiquotation *) |
277 |
276 |
278 val _ = |
277 val _ = |