equal
deleted
inserted
replaced
28 val urgent_message: string -> unit |
28 val urgent_message: string -> unit |
29 val error_message': serial * string -> unit |
29 val error_message': serial * string -> unit |
30 val error_message: string -> unit |
30 val error_message: string -> unit |
31 val prompt: string -> unit |
31 val prompt: string -> unit |
32 val status: string -> unit |
32 val status: string -> unit |
|
33 val direct_report: string -> unit |
|
34 val redirect_report: (string -> unit) -> ('a -> 'b) -> 'a -> 'b |
33 val report: string -> unit |
35 val report: string -> unit |
34 val result: Properties.T -> string -> unit |
36 val result: Properties.T -> string -> unit |
35 val protocol_message: Properties.T -> string -> unit |
37 val protocol_message: Properties.T -> string -> unit |
36 val try_protocol_message: Properties.T -> string -> unit |
38 val try_protocol_message: Properties.T -> string -> unit |
37 end; |
39 end; |
113 fun warning s = ! warning_fn (output s); |
115 fun warning s = ! warning_fn (output s); |
114 fun error_message' (i, s) = ! error_message_fn (i, output s); |
116 fun error_message' (i, s) = ! error_message_fn (i, output s); |
115 fun error_message s = error_message' (serial (), s); |
117 fun error_message s = error_message' (serial (), s); |
116 fun prompt s = ! prompt_fn (output s); |
118 fun prompt s = ! prompt_fn (output s); |
117 fun status s = ! status_fn (output s); |
119 fun status s = ! status_fn (output s); |
118 fun report s = ! report_fn (output s); |
120 |
|
121 fun direct_report s = ! report_fn (output s); |
|
122 |
|
123 local |
|
124 val tag = Universal.tag () : (string -> unit) Universal.tag; |
|
125 fun thread_data () = the_default direct_report (Thread.getLocal tag); |
|
126 in |
|
127 fun redirect_report rep = Library.setmp_thread_data tag (thread_data ()) rep; |
|
128 fun report s = thread_data () s; |
|
129 end; |
|
130 |
119 fun result props s = ! result_fn props (output s); |
131 fun result props s = ! result_fn props (output s); |
120 fun protocol_message props s = ! protocol_message_fn props (output s); |
132 fun protocol_message props s = ! protocol_message_fn props (output s); |
121 fun try_protocol_message props s = protocol_message props s handle Protocol_Message _ => (); |
133 fun try_protocol_message props s = protocol_message props s handle Protocol_Message _ => (); |
122 |
134 |
123 end; |
135 end; |