diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-05-05 19:57:54 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-05-05 19:57:54 -0400 |
commit | b1b6e894b77717f33af8e402eba712b9b19ef46a (patch) | |
tree | e97f6e6729e062b30cc26bb5f77e4933224c2063 /src/errormsg.sml | |
parent | 19e67ca8db4db99538d78cfd0a42aa20f6fc6669 (diff) |
Adjust error message format to match Emacs defaults
Diffstat (limited to 'src/errormsg.sml')
-rw-r--r-- | src/errormsg.sml | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/errormsg.sml b/src/errormsg.sml index f402c5aa..f9ed71e8 100644 --- a/src/errormsg.sml +++ b/src/errormsg.sml @@ -1,4 +1,4 @@ -(* Copyright (c) 2008, Adam Chlipala +(* Copyright (c) 2008, 2012, Adam Chlipala * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -94,8 +94,13 @@ fun anyErrors () = !errors fun error s = (TextIO.output (TextIO.stdErr, s); TextIO.output1 (TextIO.stdErr, #"\n"); errors := true) -fun errorAt span s = (TextIO.output (TextIO.stdErr, spanToString span); - TextIO.output (TextIO.stdErr, ": "); + +fun errorAt span s = (TextIO.output (TextIO.stdErr, #file span); + TextIO.output (TextIO.stdErr, ":"); + TextIO.output (TextIO.stdErr, posToString (#first span)); + TextIO.output (TextIO.stdErr, ": (to "); + TextIO.output (TextIO.stdErr, posToString (#last span)); + TextIO.output (TextIO.stdErr, ") "); error s) fun errorAt' span s = errorAt (spanOf span) s |