summaryrefslogtreecommitdiff
path: root/compiler/Main.ml
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/Main.ml')
-rw-r--r--compiler/Main.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/Main.ml b/compiler/Main.ml
index 416f3a07..6161f2f2 100644
--- a/compiler/Main.ml
+++ b/compiler/Main.ml
@@ -283,7 +283,9 @@ let () =
if !Errors.error_list <> [] then (
List.iter
(fun (meta, msg) -> log#serror (Errors.format_error_message meta msg))
- !Errors.error_list;
+ (* Reverse the list of error messages so that we print them from the
+ earliest to the latest. *)
+ (List.rev !Errors.error_list);
exit 1);
(* Print total elapsed time *)