Stefan pushed to branch master at Stefan / Typer
Commits: befa5609 by Stefan Monnier at 2017-09-25T17:46:34Z * src/util.ml (msg_message): Use GNU standard format.
- - - - -
2 changed files:
- src/env.ml - src/util.ml
Changes:
===================================== src/env.ml ===================================== --- a/src/env.ml +++ b/src/env.ml @@ -124,12 +124,13 @@ let value_name v = let rec value_string v = match v with | Vin _ -> "in_channel" - | Vout _ -> "out_channe;" + | Vout _ -> "out_channel" | Vundefined -> "<undefined!>" | Vcommand _ -> "command" | Vstring s -> """ ^ s ^ """ | Vbuiltin s -> s | Vint i -> string_of_int i + | Vinteger i -> BI.string_of_big_int i | Vfloat f -> string_of_float f | Vsexp s -> sexp_string s | Vtype e -> L.lexp_string e
===================================== src/util.ml ===================================== --- a/src/util.ml +++ b/src/util.ml @@ -66,20 +66,23 @@ let typer_unreachable s = raise (Unreachable_error s) (* Section is the name of the compilation step [for debugging] *) (* 'prerr' output is ugly *) let msg_message lvl kind section (loc: location) msg = - if lvl <= !_typer_verbose then( - let info = - " [" ^ loc_string loc ^ "] " ^ loc.file ^ "\n" ^ - " " ^ kind ^ " " ^ (Fmt.lalign_string section 8) ^ " " ^ msg ^ "\n" in - print_string info) else () + if lvl <= !_typer_verbose then + print_string (loc.file + ^ ":" ^ string_of_int loc.line + ^ ":" ^ string_of_int loc.column + ^ ":" ^ kind + ^ (if section = "" then " " else "(" ^ section ^ ") ") + ^ msg ^ "\n") + else ()
let msg_fatal s l m = msg_message 0 "[X] Fatal " s l m; flush stdout; internal_error "Compiler Fatal Error"
-let msg_error = msg_message 1 "[!] Error " -let msg_warning = msg_message 2 "/!\ Warning " -let msg_info = msg_message 3 "[?] Info " +let msg_error = msg_message 1 "Error:" +let msg_warning = msg_message 2 "Warning:" +let msg_info = msg_message 3 "Info:"
(* Compiler Internal Debug print *) let debug_msg expr =
View it on GitLab: https://gitlab.com/monnier/typer/commit/befa5609dc00c08f9ae466e92d14b1783bd2...
--- View it on GitLab: https://gitlab.com/monnier/typer/commit/befa5609dc00c08f9ae466e92d14b1783bd2... You're receiving this email because of your account on gitlab.com.