File tree Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -37,17 +37,17 @@ let get_color_enabled () =
3737 in
3838 colorful
3939
40- let color_functions : Format.formatter_tag_functions =
40+ let color_functions : Format.formatter_stag_functions =
4141 {
42- mark_open_tag =
42+ mark_open_stag =
4343 (fun s ->
4444 if get_color_enabled () then Ext_color. ansi_of_tag s
4545 else Ext_string. empty);
46- mark_close_tag =
46+ mark_close_stag =
4747 (fun _ ->
4848 if get_color_enabled () then Ext_color. reset_lit else Ext_string. empty);
49- print_open_tag = (fun _ -> () );
50- print_close_tag = (fun _ -> () );
49+ print_open_stag = (fun _ -> () );
50+ print_close_stag = (fun _ -> () );
5151 }
5252
5353(* let set_color ppf =
@@ -56,8 +56,8 @@ let color_functions : Format.formatter_tag_functions =
5656let setup () =
5757 Format. pp_set_mark_tags Format. std_formatter true ;
5858 Format. pp_set_mark_tags Format. err_formatter true ;
59- Format. pp_set_formatter_tag_functions Format. std_formatter color_functions;
60- Format. pp_set_formatter_tag_functions Format. err_formatter color_functions
59+ Format. pp_set_formatter_stag_functions Format. std_formatter color_functions;
60+ Format. pp_set_formatter_stag_functions Format. err_formatter color_functions
6161
6262type level = Debug | Info | Warn | Error
6363
Original file line number Diff line number Diff line change 22 (name bsb)
33 (wrapped false)
44 (flags
5- (:standard -w +a-d- 4-9-40-41-42-70))
5+ (:standard -w +a-4-9-40-41-42-70))
66 (libraries common ext str unix))
Original file line number Diff line number Diff line change 22 (name rescript_main)
33 (public_name rescript)
44 (flags
5- (:standard -w +a-d- 4-9-40-41-42-70))
5+ (:standard -w +a-4-9-40-41-42-70))
66 (libraries bsb common ext str unix))
Original file line number Diff line number Diff line change @@ -59,11 +59,11 @@ let code_of_style = function
5959(* * TODO: add more styles later *)
6060let style_of_tag s =
6161 match s with
62- | "error" -> [ Bold ; FG Red ]
63- | "warning" -> [ Bold ; FG Magenta ]
64- | "info" -> [ Bold ; FG Yellow ]
65- | "dim" -> [ Dim ]
66- | "filename" -> [ FG Cyan ]
62+ | Format. String_tag "error" -> [ Bold ; FG Red ]
63+ | Format. String_tag "warning" -> [ Bold ; FG Magenta ]
64+ | Format. String_tag "info" -> [ Bold ; FG Yellow ]
65+ | Format. String_tag "dim" -> [ Dim ]
66+ | Format. String_tag "filename" -> [ FG Cyan ]
6767 | _ -> []
6868
6969let ansi_of_tag s =
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ type color = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White
2626
2727type style = FG of color | BG of color | Bold | Dim
2828
29- val ansi_of_tag : string -> string
29+ val ansi_of_tag : Format .stag -> string
3030(* * Input is the tag for example `@{<warning>@}` return escape code *)
3131
3232val reset_lit : string
You can’t perform that action at this time.
0 commit comments