Skip to content
Snippets Groups Projects
Commit eadd9bcd authored by Guillaume Melquiond's avatar Guillaume Melquiond
Browse files

Open a box and use infinite width when displaying warnings.

Otherwise we get ugly line breaks. Example:

warning: termination of this expression cannot be proved, but there is no
`diverges' \\
clause in the outer \\
specification
parent d2e02d2b
Branches
No related tags found
No related merge requests found
...@@ -21,6 +21,8 @@ let set_hook = (:=) hook ...@@ -21,6 +21,8 @@ let set_hook = (:=) hook
let emit ?loc p = let emit ?loc p =
let b = Buffer.create 100 in let b = Buffer.create 100 in
let fmt = formatter_of_buffer b in let fmt = formatter_of_buffer b in
pp_set_margin fmt 1000000000;
pp_open_box fmt 0;
let handle fmt = let handle fmt =
Format.pp_print_flush fmt (); !hook ?loc (Buffer.contents b) in pp_print_flush fmt (); !hook ?loc (Buffer.contents b) in
kfprintf handle fmt p kfprintf handle fmt p
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment