| author | blanchet | 
| Mon, 04 Apr 2016 09:45:04 +0200 | |
| changeset 62842 | db9f95ca2a8f | 
| parent 62826 | eb94e570c1a4 | 
| child 62884 | 66494de0aafe | 
| permissions | -rw-r--r-- | 
| 50686 | 1 | (* Title: Pure/Tools/build.ML | 
| 48418 | 2 | Author: Makarius | 
| 3 | ||
| 4 | Build Isabelle sessions. | |
| 5 | *) | |
| 6 | ||
| 7 | signature BUILD = | |
| 8 | sig | |
| 48731 
a45ba78abcc1
more casual exit back to ML toplevel, to accomodate commit in SML/NJ which continues at the saved point;
 wenzelm parents: 
48681diff
changeset | 9 | val build: string -> unit | 
| 48418 | 10 | end; | 
| 11 | ||
| 12 | structure Build: BUILD = | |
| 13 | struct | |
| 14 | ||
| 51662 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 15 | (* command timings *) | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 16 | |
| 56615 | 17 | type timings = ((string * Time.time) Inttab.table) Symtab.table; (*file -> offset -> name, time*) | 
| 51662 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 18 | |
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 19 | val empty_timings: timings = Symtab.empty; | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 20 | |
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 21 | fun update_timings props = | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 22 | (case Markup.parse_command_timing_properties props of | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 23 |     SOME ({file, offset, name}, time) =>
 | 
| 51666 
b97aeb018900
add command timings (like document command status);
 wenzelm parents: 
51662diff
changeset | 24 | Symtab.map_default (file, Inttab.empty) | 
| 62826 | 25 | (Inttab.map_default (offset, (name, time)) (fn (_, t) => (name, t + time))) | 
| 51662 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 26 | | NONE => I); | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 27 | |
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 28 | fun approximative_id name pos = | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 29 | (case (Position.file_of pos, Position.offset_of pos) of | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 30 | (SOME file, SOME offset) => | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 31 |       if name = "" then NONE else SOME {file = file, offset = offset, name = name}
 | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 32 | | _ => NONE); | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 33 | |
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 34 | fun lookup_timings timings tr = | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 35 | (case approximative_id (Toplevel.name_of tr) (Toplevel.pos_of tr) of | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 36 |     SOME {file, offset, name} =>
 | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 37 | (case Symtab.lookup timings file of | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 38 | SOME offsets => | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 39 | (case Inttab.lookup offsets offset of | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 40 | SOME (name', time) => if name = name' then SOME time else NONE | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 41 | | NONE => NONE) | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 42 | | NONE => NONE) | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 43 | | NONE => NONE); | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 44 | |
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 45 | |
| 52052 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 46 | (* session timing *) | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 47 | |
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 48 | fun session_timing name verbose f x = | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 49 | let | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 50 | val start = Timing.start (); | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 51 | val y = f x; | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 52 | val timing = Timing.result start; | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 53 | |
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 54 | val threads = string_of_int (Multithreading.max_threads_value ()); | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 55 | val factor = Time.toReal (#cpu timing) / Time.toReal (#elapsed timing) | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 56 | |> Real.fmt (StringCvt.FIX (SOME 2)); | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 57 | |
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 58 | val timing_props = | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 59 |       [("threads", threads)] @ Markup.timing_properties timing @ [("factor", factor)];
 | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 60 |     val _ = writeln ("\fTiming = " ^ YXML.string_of_body (XML.Encode.properties timing_props));
 | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 61 | val _ = | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 62 | if verbose then | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 63 |         Output.physical_stderr ("Timing " ^ name ^ " (" ^
 | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 64 | threads ^ " threads, " ^ Timing.message timing ^ ", factor " ^ factor ^ ")\n") | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 65 | else (); | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 66 | in y end; | 
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 67 | |
| 
892061142ba6
discontinued obsolete isabelle usedir, mkdir, make;
 wenzelm parents: 
52041diff
changeset | 68 | |
| 50683 | 69 | (* protocol messages *) | 
| 70 | ||
| 51662 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 71 | fun inline_message a args = | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 72 |   writeln ("\f" ^ a ^ " = " ^ YXML.string_of_body (XML.Encode.properties args));
 | 
| 50683 | 73 | |
| 74 | fun protocol_message props output = | |
| 51216 | 75 | (case props of | 
| 76 | function :: args => | |
| 51662 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 77 | if function = Markup.ML_statistics orelse function = Markup.task_statistics then | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 78 | inline_message (#2 function) args | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 79 | else if function = Markup.command_timing then | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 80 | let | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 81 | val name = the_default "" (Properties.get args Markup.nameN); | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 82 | val pos = Position.of_properties args; | 
| 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 83 |           val {elapsed, ...} = Markup.parse_timing_properties args;
 | 
| 62793 
f235646b1b73
less bulky timing information, e.g. HOL 56913 ~> 672;
 wenzelm parents: 
62715diff
changeset | 84 | val is_significant = | 
| 
f235646b1b73
less bulky timing information, e.g. HOL 56913 ~> 672;
 wenzelm parents: 
62715diff
changeset | 85 | Timing.is_relevant_time elapsed andalso | 
| 62826 | 86 | elapsed >= Options.default_seconds "command_timing_threshold"; | 
| 51662 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 87 | in | 
| 62793 
f235646b1b73
less bulky timing information, e.g. HOL 56913 ~> 672;
 wenzelm parents: 
62715diff
changeset | 88 | if is_significant then | 
| 59149 
0070053570c4
suppress irrelevant timing messages (the majority);
 wenzelm parents: 
59058diff
changeset | 89 | (case approximative_id name pos of | 
| 
0070053570c4
suppress irrelevant timing messages (the majority);
 wenzelm parents: 
59058diff
changeset | 90 | SOME id => inline_message (#2 function) (Markup.command_timing_properties id elapsed) | 
| 
0070053570c4
suppress irrelevant timing messages (the majority);
 wenzelm parents: 
59058diff
changeset | 91 | | NONE => ()) | 
| 
0070053570c4
suppress irrelevant timing messages (the majority);
 wenzelm parents: 
59058diff
changeset | 92 | else () | 
| 51662 
3391a493f39a
just one timing protocol function, with 3 implementations: TTY/PG, PIDE/document, build;
 wenzelm parents: 
51661diff
changeset | 93 | end | 
| 51216 | 94 | else | 
| 95 | (case Markup.dest_loading_theory props of | |
| 96 |           SOME name => writeln ("\floading_theory = " ^ name)
 | |
| 51661 | 97 | | NONE => raise Output.Protocol_Message props) | 
| 98 | | [] => raise Output.Protocol_Message props); | |
| 51045 
630c0895d9d1
more efficient inlined properties, especially relevant for voluminous tasks trace;
 wenzelm parents: 
50982diff
changeset | 99 | |
| 50683 | 100 | |
| 101 | (* build *) | |
| 102 | ||
| 61381 | 103 | fun build_theories symbols last_timing master_dir (options, thys) = | 
| 59366 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 104 | let | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 105 | val condition = space_explode "," (Options.string options "condition"); | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 106 | val conds = filter_out (can getenv_strict) condition; | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 107 | in | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 108 | if null conds then | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 109 | (Options.set_default options; | 
| 62714 | 110 | Isabelle_Process.init_options (); | 
| 59366 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 111 |         (Thy_Info.use_theories {
 | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 112 | document = Present.document_enabled (Options.string options "document"), | 
| 61381 | 113 | symbols = symbols, | 
| 59366 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 114 | last_timing = last_timing, | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 115 | master_dir = master_dir} | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 116 | |> Unsynchronized.setmp print_mode | 
| 62714 | 117 | (space_explode "," (Options.string options "print_mode") @ print_mode_value ())) thys) | 
| 59366 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 118 | else | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 119 |       Output.physical_stderr ("Skipping theories " ^ commas_quote (map #1 thys) ^
 | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 120 | " (undefined " ^ commas conds ^ ")\n") | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 121 | end; | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 122 | |
| 62630 | 123 | fun build args_file = | 
| 124 | let | |
| 62666 | 125 | val _ = SHA1.test_samples (); | 
| 53212 
387b9f7cb0ac
added SHA1 library integrity test, which is invoked at compile time and Isabelle_Process run-time;
 wenzelm parents: 
52852diff
changeset | 126 | |
| 62630 | 127 | val (symbol_codes, (command_timings, (do_output, (verbose, (browser_info, | 
| 128 | (document_files, (graph_file, (parent_name, (chapter, (name, theories)))))))))) = | |
| 129 | File.read (Path.explode args_file) |> YXML.parse_body |> | |
| 130 | let open XML.Decode in | |
| 131 | pair (list (pair string int)) (pair (list properties) (pair bool | |
| 132 | (pair bool (pair string (pair (list (pair string string)) (pair string | |
| 133 | (pair string (pair string (pair string | |
| 134 | ((list (pair Options.decode (list (string #> rpair Position.none)))))))))))))) | |
| 135 | end; | |
| 48418 | 136 | |
| 62630 | 137 | val symbols = HTML.make_symbols symbol_codes; | 
| 62713 | 138 | val _ = Options.load_default (); | 
| 139 | val _ = Isabelle_Process.init_options (); | |
| 51941 
ead4248aef3b
full default options for Isabelle_Process and Build;
 wenzelm parents: 
51666diff
changeset | 140 | |
| 62630 | 141 |     val _ = writeln ("\fSession.name = " ^ name);
 | 
| 142 | val _ = | |
| 143 | Session.init | |
| 144 | symbols | |
| 145 | do_output | |
| 146 | (Options.default_bool "browser_info") | |
| 147 | (Path.explode browser_info) | |
| 148 | (Options.default_string "document") | |
| 149 | (Options.default_string "document_output") | |
| 150 | (Present.document_variants (Options.default_string "document_variants")) | |
| 151 | (map (apply2 Path.explode) document_files) | |
| 152 | (Path.explode graph_file) | |
| 153 | parent_name (chapter, name) | |
| 154 | verbose; | |
| 49911 
262c36fd5f26
collective errors from use_thys and Session.finish/Goal.finish_futures -- avoid uninformative interrupts stemming from failure of goal forks that are not registered in the theory (e.g. unnamed theorems);
 wenzelm parents: 
49242diff
changeset | 155 | |
| 62630 | 156 | val last_timing = lookup_timings (fold update_timings command_timings empty_timings); | 
| 51218 
6425a0d3b7ac
support for build passing timings from Scala to ML;
 wenzelm parents: 
51217diff
changeset | 157 | |
| 62630 | 158 | val res1 = | 
| 159 | theories |> | |
| 160 | (List.app (build_theories symbols last_timing Path.current) | |
| 161 | |> session_timing name verbose | |
| 162 | |> Unsynchronized.setmp Output.protocol_message_fn protocol_message | |
| 163 | |> Exn.capture); | |
| 164 | val res2 = Exn.capture Session.finish (); | |
| 165 | val _ = Par_Exn.release_all [res1, res2]; | |
| 48673 
b2b09970c571
let with_timing report overall number of threads;
 wenzelm parents: 
48672diff
changeset | 166 | |
| 62630 | 167 | val _ = Options.reset_default (); | 
| 168 | in () end; | |
| 48418 | 169 | |
| 59366 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 170 | |
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 171 | (* PIDE protocol *) | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 172 | |
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 173 | val _ = | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 174 | Isabelle_Process.protocol_command "build_theories" | 
| 61381 | 175 | (fn [id, symbol_codes_yxml, master_dir, theories_yxml] => | 
| 59366 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 176 | let | 
| 61381 | 177 | val symbols = | 
| 178 | YXML.parse_body symbol_codes_yxml | |
| 179 | |> let open XML.Decode in list (pair string int) end | |
| 180 | |> HTML.make_symbols; | |
| 59366 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 181 | val theories = | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 182 | YXML.parse_body theories_yxml |> | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 183 | let open XML.Decode | 
| 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 184 | in list (pair Options.decode (list (string #> rpair Position.none))) end; | 
| 59369 
7090199d3f78
more informative build_theories_result: cumulative Runtime.exn_message;
 wenzelm parents: 
59368diff
changeset | 185 | val res1 = | 
| 59366 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 186 | Exn.capture (fn () => | 
| 61381 | 187 | theories |> List.app (build_theories symbols (K NONE) (Path.explode master_dir))) (); | 
| 59369 
7090199d3f78
more informative build_theories_result: cumulative Runtime.exn_message;
 wenzelm parents: 
59368diff
changeset | 188 | val res2 = Exn.capture Session.shutdown (); | 
| 
7090199d3f78
more informative build_theories_result: cumulative Runtime.exn_message;
 wenzelm parents: 
59368diff
changeset | 189 | val result = | 
| 
7090199d3f78
more informative build_theories_result: cumulative Runtime.exn_message;
 wenzelm parents: 
59368diff
changeset | 190 | (Par_Exn.release_all [res1, res2]; "") handle exn => | 
| 
7090199d3f78
more informative build_theories_result: cumulative Runtime.exn_message;
 wenzelm parents: 
59368diff
changeset | 191 | (Runtime.exn_message exn handle _ (*sic!*) => | 
| 
7090199d3f78
more informative build_theories_result: cumulative Runtime.exn_message;
 wenzelm parents: 
59368diff
changeset | 192 | "Exception raised, but failed to print details!"); | 
| 
7090199d3f78
more informative build_theories_result: cumulative Runtime.exn_message;
 wenzelm parents: 
59368diff
changeset | 193 | in Output.protocol_message (Markup.build_theories_result id) [result] end); | 
| 59366 
e94df7f6b608
clarified build_theories: proper protocol handler;
 wenzelm parents: 
59364diff
changeset | 194 | |
| 48418 | 195 | end; |