kazu-yamamoto/ghc-mod — pull request #321 by serras (2014-08-15 07:45:04+00:00)
Title: Obtain all warnings even in presence of typed holes

This request finally fixes the problems stated in #310. I have used a combination of error deferring + two passes over the file.
Using error deferring ensures that all errors and warnings are reported, even in the presence of typed holes. However, deferring errors means that everything is reported as warning. For that reason, in a first pass we collect error messages without deferring, and then in a second we obtain more warning messages with deferring. If a message appear as error in the first, and as warning in the second, it is taken as an actual error and reported as such.