author | wenzelm |
Sun, 10 Aug 2025 23:35:19 +0200 | |
changeset 82986 | 951e009e20f4 |
parent 82316 | 83584916b6d7 |
permissions | -rw-r--r-- |
62930 | 1 |
(* Title: Pure/General/output_primitives.ML |
2 |
Author: Makarius |
|
3 |
||
4 |
Primitives for Isabelle output channels. |
|
5 |
*) |
|
6 |
||
7 |
signature OUTPUT_PRIMITIVES = |
|
8 |
sig |
|
9 |
type output = string |
|
10 |
type serial = int |
|
11 |
type properties = (string * string) list |
|
65301
fca593a62785
restore output channels after shutdown, e.g. relevant for saved heap;
wenzelm
parents:
62933
diff
changeset
|
12 |
val ignore_outputs: output list -> unit |
62930 | 13 |
val writeln_fn: output list -> unit |
82316
83584916b6d7
support for writeln_urgent, which is shown in Output before state messages (reminiscent of old Output.urgent_message before 521cea5fa777);
wenzelm
parents:
80801
diff
changeset
|
14 |
val writeln_urgent_fn: output list -> unit |
62930 | 15 |
val state_fn: output list -> unit |
16 |
val information_fn: output list -> unit |
|
17 |
val tracing_fn: output list -> unit |
|
18 |
val warning_fn: output list -> unit |
|
19 |
val legacy_fn: output list -> unit |
|
20 |
val error_message_fn: serial * output list -> unit |
|
21 |
val system_message_fn: output list -> unit |
|
22 |
val status_fn: output list -> unit |
|
23 |
val report_fn: output list -> unit |
|
24 |
val result_fn: properties -> output list -> unit |
|
73559 | 25 |
type protocol_message_fn = properties -> XML.body list -> unit |
70991
f9f7c34b7dd4
more scalable protocol_message: use XML.body directly (Output.output hook is not required);
wenzelm
parents:
65301
diff
changeset
|
26 |
val protocol_message_fn: protocol_message_fn |
62933
f14569a9ab93
proper output of markup, e.g. relevant for nested ML as used in Pure/System/bash.ML;
wenzelm
parents:
62930
diff
changeset
|
27 |
val markup_fn: string * properties -> output * output |
62930 | 28 |
end; |
29 |
||
30 |
structure Output_Primitives: OUTPUT_PRIMITIVES = |
|
31 |
struct |
|
32 |
||
70991
f9f7c34b7dd4
more scalable protocol_message: use XML.body directly (Output.output hook is not required);
wenzelm
parents:
65301
diff
changeset
|
33 |
(* output *) |
f9f7c34b7dd4
more scalable protocol_message: use XML.body directly (Output.output hook is not required);
wenzelm
parents:
65301
diff
changeset
|
34 |
|
62930 | 35 |
type output = string; |
36 |
type serial = int; |
|
37 |
type properties = (string * string) list; |
|
38 |
||
39 |
fun ignore_outputs (_: output list) = (); |
|
40 |
||
41 |
val writeln_fn = ignore_outputs; |
|
82316
83584916b6d7
support for writeln_urgent, which is shown in Output before state messages (reminiscent of old Output.urgent_message before 521cea5fa777);
wenzelm
parents:
80801
diff
changeset
|
42 |
val writeln_urgent_fn = ignore_outputs; |
62930 | 43 |
val state_fn = ignore_outputs; |
44 |
val information_fn = ignore_outputs; |
|
45 |
val tracing_fn = ignore_outputs; |
|
46 |
val warning_fn = ignore_outputs; |
|
47 |
val legacy_fn = ignore_outputs; |
|
48 |
fun error_message_fn (_: serial, _: output list) = (); |
|
49 |
val system_message_fn = ignore_outputs; |
|
50 |
val status_fn = ignore_outputs; |
|
51 |
val report_fn = ignore_outputs; |
|
52 |
fun result_fn (_: properties) = ignore_outputs; |
|
70991
f9f7c34b7dd4
more scalable protocol_message: use XML.body directly (Output.output hook is not required);
wenzelm
parents:
65301
diff
changeset
|
53 |
|
73559 | 54 |
type protocol_message_fn = properties -> XML.body list -> unit; |
70991
f9f7c34b7dd4
more scalable protocol_message: use XML.body directly (Output.output hook is not required);
wenzelm
parents:
65301
diff
changeset
|
55 |
val protocol_message_fn: protocol_message_fn = fn _ => fn _ => (); |
62930 | 56 |
|
62933
f14569a9ab93
proper output of markup, e.g. relevant for nested ML as used in Pure/System/bash.ML;
wenzelm
parents:
62930
diff
changeset
|
57 |
fun markup_fn (_: string * properties) = ("", ""); |
f14569a9ab93
proper output of markup, e.g. relevant for nested ML as used in Pure/System/bash.ML;
wenzelm
parents:
62930
diff
changeset
|
58 |
|
62930 | 59 |
end; |