Commit ee8d1e58 authored by Jean-Christophe Filliâtre's avatar Jean-Christophe Filliâtre
Browse files

better and nicer error messages

parent 9088cf52
......@@ -466,7 +466,8 @@ let () = Exn_printer.register
fprintf fmt "'%a' is a constructor/field of an abstract type \
and cannot be used in a program" print_ls ls;
| Mlw_expr.GhostWrite (_e, _reg) ->
fprintf fmt "This expression stores a ghost value in a non-ghost location"
fprintf fmt
"This expression performs a ghost write in a non-ghost location"
| Mlw_expr.GhostRaise (_e, xs) ->
fprintf fmt "This expression raises an escaping ghost exception %a"
print_xs xs
......@@ -184,7 +184,7 @@ let dity_mark = ts_app ts_mark []
let unify_loc unify_fn loc x1 x2 = try unify_fn x1 x2 with
| TypeMismatch (ity1,ity2) -> errorm ~loc
"This expression has type %a, but is expected to have type %a"
"This expression has type %a,@ but is expected to have type %a"
Mlw_pretty.print_ity ity2 Mlw_pretty.print_ity ity1
| exn -> error ~loc exn
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