[nhc-bugs] the format of error diagnostics
Malcolm Wallace
Malcolm.Wallace@cs.york.ac.uk
Mon, 10 Dec 2001 14:28:38 +0000
> nhc98 would be much more convenient to use if the error diagnostics were
> compatible with Emacs compile mode.
I would like to make that possible, but I'm not sure exactly how it
would work. For instance you suggest
> nhc98 -c -d ../nhc Flatten.hs
>
> ====================================
> Error when renaming::
> Constructor OK used at 833:6 is not defined.
should be more like
> Flatten.hs:833:6: Error when renaming::
> Constructor OK is not defined.
But what should the following kind of report translate to?
Error when renaming::
Constructor OK used at 117:30, 103:15, 98:21, 72:13, 35:5 is not defined.
Identifier splitWhile used at 110:13, 106:8, 102:8, 91:13 is not defined.
Identifier digit used at 272:52, 259:52 is not defined.
Do you want a separate line for each? And how about this one:
Error after type deriving/checking:
Type error type clash between Prelude.Int and Main.Foo
when trying to apply function at 4:17 to its 1:st argument at 4:8.
A type error is always found as a mismatch between two expressions,
leading to at least two possible positions. Which position should
the type error be reported for?
Regards,
Malcolm