src/Pure/General/output.ML
changeset 38236 d8c7be27e01d
parent 37784 1d639d28832c
child 38836 52cee2c5f219
equal deleted inserted replaced
38235:25d6f789618b 38236:d8c7be27e01d
    37   val warning_fn: (output -> unit) Unsynchronized.ref
    37   val warning_fn: (output -> unit) Unsynchronized.ref
    38   val error_fn: (output -> unit) Unsynchronized.ref
    38   val error_fn: (output -> unit) Unsynchronized.ref
    39   val debug_fn: (output -> unit) Unsynchronized.ref
    39   val debug_fn: (output -> unit) Unsynchronized.ref
    40   val prompt_fn: (output -> unit) Unsynchronized.ref
    40   val prompt_fn: (output -> unit) Unsynchronized.ref
    41   val status_fn: (output -> unit) Unsynchronized.ref
    41   val status_fn: (output -> unit) Unsynchronized.ref
       
    42   val report_fn: (output -> unit) Unsynchronized.ref
    42   val error_msg: string -> unit
    43   val error_msg: string -> unit
    43   val prompt: string -> unit
    44   val prompt: string -> unit
    44   val status: string -> unit
    45   val status: string -> unit
       
    46   val report: string -> unit
    45   val debugging: bool Unsynchronized.ref
    47   val debugging: bool Unsynchronized.ref
    46   val no_warnings_CRITICAL: ('a -> 'b) -> 'a -> 'b
    48   val no_warnings_CRITICAL: ('a -> 'b) -> 'a -> 'b
    47   val debug: (unit -> string) -> unit
    49   val debug: (unit -> string) -> unit
    48 end;
    50 end;
    49 
    51 
    96 val warning_fn = Unsynchronized.ref (std_output o suffix "\n" o prefix_lines "### ");
    98 val warning_fn = Unsynchronized.ref (std_output o suffix "\n" o prefix_lines "### ");
    97 val error_fn = Unsynchronized.ref (std_output o suffix "\n" o prefix_lines "*** ");
    99 val error_fn = Unsynchronized.ref (std_output o suffix "\n" o prefix_lines "*** ");
    98 val debug_fn = Unsynchronized.ref (std_output o suffix "\n" o prefix_lines "::: ");
   100 val debug_fn = Unsynchronized.ref (std_output o suffix "\n" o prefix_lines "::: ");
    99 val prompt_fn = Unsynchronized.ref std_output;
   101 val prompt_fn = Unsynchronized.ref std_output;
   100 val status_fn = Unsynchronized.ref (fn _: string => ());
   102 val status_fn = Unsynchronized.ref (fn _: string => ());
       
   103 val report_fn = Unsynchronized.ref (fn _: string => ());
   101 
   104 
   102 fun writeln s = ! writeln_fn (output s);
   105 fun writeln s = ! writeln_fn (output s);
   103 fun priority s = ! priority_fn (output s);
   106 fun priority s = ! priority_fn (output s);
   104 fun tracing s = ! tracing_fn (output s);
   107 fun tracing s = ! tracing_fn (output s);
   105 fun warning s = ! warning_fn (output s);
   108 fun warning s = ! warning_fn (output s);
   106 fun error_msg s = ! error_fn (output s);
   109 fun error_msg s = ! error_fn (output s);
   107 fun prompt s = ! prompt_fn (output s);
   110 fun prompt s = ! prompt_fn (output s);
   108 fun status s = ! status_fn (output s);
   111 fun status s = ! status_fn (output s);
       
   112 fun report s = ! report_fn (output s);
   109 
   113 
   110 fun legacy_feature s = warning ("Legacy feature! " ^ s);
   114 fun legacy_feature s = warning ("Legacy feature! " ^ s);
   111 
   115 
   112 fun no_warnings_CRITICAL f = setmp_CRITICAL warning_fn (K ()) f;
   116 fun no_warnings_CRITICAL f = setmp_CRITICAL warning_fn (K ()) f;
   113 
   117