[MLton] caching elaboration

Daniel C. Wang danwang@CS.Princeton.EDU
Mon, 16 Aug 2004 22:52:02 -0400


Henry Cejtin wrote:

> I  think  I disagree on re-ordering error reports for only one reason: when a
> compiler spots an error, it makes some kind of correction.  This  is  clearly
> the  case  with syntax errors, but even for type errors.  This means that all
> errors reported later are suspect  because  they  are  errors  in  a  program
> different  from  what  I  gave  to  the  compiler.   They  are  errors in the
> `corrected' program.


Well, the right thing to do is to track which errors are "atomic" and which 
are the result of a "correction" with this information you can decide to 
filter the error messages to include only the atomic  errors and maybe the 
first N or so supect errors or always report the atomic errors first. Norman 
Ramsey has a paper on error combinators that let you propagate this derived 
vs atomic error information relatively easily.

I think the issue of error recovery is really unrelated to the detection vs 
reporting gripe I have.