cascading type errors in ghc

Malcolm Wallace malcolm.wallace at
Fri Aug 9 10:48:30 CEST 2013

On 6 Aug 2013, at 20:03, Evan Laforge wrote:

> I don't know how others like to work, but I like when a compiler bails
> early, because I fix errors one at a time, and I search for the
> easiest looking ones before worrying about the complicated looking
> ones.

With C compilers, it is often the case that only the first error is real, and the subsequent errors are consequences of not being able to recover from the first one.

However, one of the really nice things about GHC is that the list of type errors is complete and coherent.  I often start at the bottom of the list and work my way up fixing them in a single pass (upwards, in order to give myself the best chance that the line numbers are still correct after I have fixed the later errors).  There are not many compilers you can do that with, and I like it when I can.


More information about the Glasgow-haskell-users mailing list