[MLton] caching elaboration
Daniel C. Wang
danwang@CS.Princeton.EDU
Mon, 16 Aug 2004 20:42:29 -0400
This is a general gripe I have with compilers of all sorts. It always
annoyed me that errors are reported in the order they are detected during
parsing and elaboration of a program. This means errors get reported based
on the wims of the implementation.
The order of error reporting should be decoupled from the order of error
detection.
I think, it be nice to go to a buffered error message architecture. i.e. all
the error messages for an invocation are collected into a data structure.
There should be enough meta-information so you can post-process the error
buffer into what every sensible reporting order makes sense. Users as well
as testing scripts can rely on a particular order of error messages even if
the order in which errors are detected radically changes within the
implementation from version to version.
Henry Cejtin wrote:
> With regards to getting parse errors from later files before type errors from
> earlier ones, I would agree with Stephen, but more strongly, that it is better
> to see all errors from the first file first. It just matches more how I
> think of compilation working.
>