@@ -274,7 +274,7 @@ let string_of_file ic =
274
274
in copy()
275
275
276
276
let output_to_bin_file_directly filename fn =
277
- let oc = Pervasives. open_out_bin filename in
277
+ let oc = open_out_bin filename in
278
278
match fn filename oc with
279
279
| v -> close_out oc ; v
280
280
| exception e -> close_out oc ; raise e
@@ -593,12 +593,12 @@ module Color = struct
593
593
(* map a tag to a style, if the tag is known.
594
594
@raise Not_found otherwise *)
595
595
let style_of_tag s = match s with
596
- | "error" -> (! cur_styles).error
597
- | "warning" -> (! cur_styles).warning
598
- | "loc" -> (! cur_styles).loc
599
- | "info" -> [Bold ; FG Yellow ]
600
- | "dim" -> [Dim ]
601
- | "filename" -> [FG Cyan ]
596
+ | Format. String_tag "error" -> (! cur_styles).error
597
+ | Format. String_tag "warning" -> (! cur_styles).warning
598
+ | Format. String_tag "loc" -> (! cur_styles).loc
599
+ | Format. String_tag "info" -> [Bold ; FG Yellow ]
600
+ | Format. String_tag "dim" -> [Dim ]
601
+ | Format. String_tag "filename" -> [FG Cyan ]
602
602
| _ -> raise Not_found
603
603
604
604
let color_enabled = ref true
@@ -619,13 +619,13 @@ module Color = struct
619
619
(* add color handling to formatter [ppf] *)
620
620
let set_color_tag_handling ppf =
621
621
let open Format in
622
- let functions = pp_get_formatter_tag_functions ppf () in
622
+ let functions = pp_get_formatter_stag_functions ppf () in
623
623
let functions' = {functions with
624
- mark_open_tag = (mark_open_tag ~or_else: functions.mark_open_tag );
625
- mark_close_tag = (mark_close_tag ~or_else: functions.mark_close_tag );
624
+ mark_open_stag = (mark_open_tag ~or_else: functions.mark_open_stag );
625
+ mark_close_stag = (mark_close_tag ~or_else: functions.mark_close_stag );
626
626
} in
627
627
pp_set_mark_tags ppf true ; (* enable tags *)
628
- pp_set_formatter_tag_functions ppf functions';
628
+ pp_set_formatter_stag_functions ppf functions';
629
629
(* also setup margins *)
630
630
pp_set_margin ppf (pp_get_margin std_formatter() );
631
631
()
0 commit comments