summaryrefslogtreecommitdiffstats
path: root/driver/errors.ml
diff options
context:
space:
mode:
Diffstat (limited to 'driver/errors.ml')
-rw-r--r--driver/errors.ml8
1 files changed, 3 insertions, 5 deletions
diff --git a/driver/errors.ml b/driver/errors.ml
index 5faa274da..14a1a23cb 100644
--- a/driver/errors.ml
+++ b/driver/errors.ml
@@ -39,6 +39,8 @@ let report_error ppf exn =
fprintf ppf
"In this program,@ variant constructors@ `%s and `%s@ \
have the same hash value.@ Change one of them." l l'
+ | Typecore.Error(loc, env, err) ->
+ Location.print_error ppf loc; Typecore.report_error env ppf err
| Typetexp.Error(loc, env, err) ->
Location.print_error ppf loc; Typetexp.report_error env ppf err
| Typedecl.Error(loc, err) ->
@@ -74,10 +76,6 @@ let report_error ppf exn =
| Warnings.Errors (n) ->
Location.print_error_cur_file ppf;
fprintf ppf "Some fatal warnings were triggered (%d occurrences)" n
- | x ->
- match Location.error_of_exn x with
- | Some err -> Location.report_error ppf err
- | None -> fprintf ppf "@]"; raise x
- in
+ | x -> fprintf ppf "@]"; raise x in
fprintf ppf "@[%a@]@." report exn