Lint is too chatty when spitting out warnings
In some of my build trees, when compiling library
Data/Binary/Class.hs, I got stupendous amount of output, of the form
Bug.hs:91:1: warning: Unsafe coercion: right-hand type is levity-polymorphic From: k1_a1kR To: a2_s4VW <truly vast amounts of goop>
I'm not sure why this is happening now, all of a sudden, but the increase in volume can be traced to
commit 0dad81ca5fd1f63bf8a3b6ad09787559e8bd05c0 Author: Simon Peyton Jones <email@example.com> Date: Fri Aug 30 13:43:24 2019 +0100 Fix bogus type of case expression
which "improved" Core Lint's output.
This patch makes Lint less chatty:
- For warnings, I don't print details of the location, unless you add
- For errors, I still print all the info. They are fatal and stop exection, whereas warnings appear repeatedly.
- I've made much less use of
LintLocInfo; the expression can be gigantic.