File tree 5 files changed +15
-15
lines changed
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 () =
37
37
in
38
38
colorful
39
39
40
- let color_functions : Format.formatter_tag_functions =
40
+ let color_functions : Format.formatter_stag_functions =
41
41
{
42
- mark_open_tag =
42
+ mark_open_stag =
43
43
(fun s ->
44
44
if get_color_enabled () then Ext_color. ansi_of_tag s
45
45
else Ext_string. empty);
46
- mark_close_tag =
46
+ mark_close_stag =
47
47
(fun _ ->
48
48
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 _ -> () );
51
51
}
52
52
53
53
(* let set_color ppf =
@@ -56,8 +56,8 @@ let color_functions : Format.formatter_tag_functions =
56
56
let setup () =
57
57
Format. pp_set_mark_tags Format. std_formatter true ;
58
58
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
61
61
62
62
type level = Debug | Info | Warn | Error
63
63
Original file line number Diff line number Diff line change 2
2
(name bsb)
3
3
(wrapped false)
4
4
(flags
5
- (:standard -w +a-d- 4-9-40-41-42-70))
5
+ (:standard -w +a-4-9-40-41-42-70))
6
6
(libraries common ext str unix))
Original file line number Diff line number Diff line change 2
2
(name rescript_main)
3
3
(public_name rescript)
4
4
(flags
5
- (:standard -w +a-d- 4-9-40-41-42-70))
5
+ (:standard -w +a-4-9-40-41-42-70))
6
6
(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
59
59
(* * TODO: add more styles later *)
60
60
let style_of_tag s =
61
61
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 ]
67
67
| _ -> []
68
68
69
69
let 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
26
26
27
27
type style = FG of color | BG of color | Bold | Dim
28
28
29
- val ansi_of_tag : string -> string
29
+ val ansi_of_tag : Format .stag -> string
30
30
(* * Input is the tag for example `@{<warning>@}` return escape code *)
31
31
32
32
val reset_lit : string
You can’t perform that action at this time.
0 commit comments