Commit c7cf7aa2 authored by Bruno Guillaume's avatar Bruno Guillaume
Browse files

flush warning and info

parent 797330bf
......@@ -64,15 +64,15 @@ module Error = struct
let parse ?loc = Printf.ksprintf (parse_ ?loc)
let warning_ ?loc message =
match loc with
| Some loc -> ANSITerminal.eprintf [ANSITerminal.blue] "[%s] %s\n" (Loc.to_string loc) message
| None -> ANSITerminal.eprintf [ANSITerminal.blue] "%s\n" message
let prefix = match loc with Some l -> sprintf "[%s] " (Loc.to_string l) | None -> "" in
ANSITerminal.eprintf [ANSITerminal.blue] "%s%s\n%!" prefix message;
flush stderr
let warning ?loc = Printf.ksprintf (warning_ ?loc)
let info_ ?loc message =
match loc with
| Some loc -> ANSITerminal.eprintf [ANSITerminal.green] "[%s] %s\n" (Loc.to_string loc) message
| None -> ANSITerminal.eprintf [ANSITerminal.green] "%s\n" message
let prefix = match loc with Some l -> sprintf "[%s] " (Loc.to_string l) | None -> "" in
ANSITerminal.eprintf [ANSITerminal.green] "%s%s\n%!" prefix message;
flush stderr
let info ?loc = Printf.ksprintf (info_ ?loc)
end (* module Error *)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment