| author | wenzelm | 
| Tue, 11 Dec 2018 23:59:41 +0100 | |
| changeset 69450 | b28b001e7ee8 | 
| parent 65301 | fca593a62785 | 
| child 70991 | f9f7c34b7dd4 | 
| 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  | 
14  | 
val state_fn: output list -> unit  | 
|
15  | 
val information_fn: output list -> unit  | 
|
16  | 
val tracing_fn: output list -> unit  | 
|
17  | 
val warning_fn: output list -> unit  | 
|
18  | 
val legacy_fn: output list -> unit  | 
|
19  | 
val error_message_fn: serial * output list -> unit  | 
|
20  | 
val system_message_fn: output list -> unit  | 
|
21  | 
val status_fn: output list -> unit  | 
|
22  | 
val report_fn: output list -> unit  | 
|
23  | 
val result_fn: properties -> output list -> unit  | 
|
24  | 
val protocol_message_fn: properties -> output list -> unit  | 
|
| 
62933
 
f14569a9ab93
proper output of markup, e.g. relevant for nested ML as used in Pure/System/bash.ML;
 
wenzelm 
parents: 
62930 
diff
changeset
 | 
25  | 
val markup_fn: string * properties -> output * output  | 
| 62930 | 26  | 
end;  | 
27  | 
||
28  | 
structure Output_Primitives: OUTPUT_PRIMITIVES =  | 
|
29  | 
struct  | 
|
30  | 
||
31  | 
type output = string;  | 
|
32  | 
type serial = int;  | 
|
33  | 
type properties = (string * string) list;  | 
|
34  | 
||
35  | 
fun ignore_outputs (_: output list) = ();  | 
|
36  | 
||
37  | 
val writeln_fn = ignore_outputs;  | 
|
38  | 
val state_fn = ignore_outputs;  | 
|
39  | 
val information_fn = ignore_outputs;  | 
|
40  | 
val tracing_fn = ignore_outputs;  | 
|
41  | 
val warning_fn = ignore_outputs;  | 
|
42  | 
val legacy_fn = ignore_outputs;  | 
|
43  | 
fun error_message_fn (_: serial, _: output list) = ();  | 
|
44  | 
val system_message_fn = ignore_outputs;  | 
|
45  | 
val status_fn = ignore_outputs;  | 
|
46  | 
val report_fn = ignore_outputs;  | 
|
47  | 
fun result_fn (_: properties) = ignore_outputs;  | 
|
48  | 
fun protocol_message_fn (_: properties) = ignore_outputs;  | 
|
49  | 
||
| 
62933
 
f14569a9ab93
proper output of markup, e.g. relevant for nested ML as used in Pure/System/bash.ML;
 
wenzelm 
parents: 
62930 
diff
changeset
 | 
50  | 
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
 | 
51  | 
|
| 62930 | 52  | 
end;  |