haskell-mode
haskell-mode copied to clipboard
:set +c makes all warnings appear twice, breaking some functionality
I'm not sure why nobody noticed this, but for me, the :set +c
has the bad side-effect of producing this:
<- [-Wunused-imports]
The import of ‘Data.Typeable’ is redundant
except perhaps to import instances from ‘Data.Typeable’
To import instances alone, use: import Data.Typeable()
Ok, modules loaded: Variable.
Collecting type info for 1 module(s) ...
/home/ptival/chick/lib/Term/Variable.hs:18:1-20: warning: [-Wunused-imports]
The import of ‘Data.Typeable’ is redundant
except perhaps to import instances from ‘Data.Typeable’
To import instances alone, use: import Data.Typeable()
That is, it seems warnings are emitted once when type-checking, then once more when colllecting type information.
This has the bad side effect that features like "removing redundant imports" ask me to remove each import twice!
I had wondered why many errors were reported twice, but never bothered to dig into why! Thanks!
Confirm, same behavior.
I see double warnings even with removed "+c".
I can confirm that I also see double warnings. Unsetting "+c" by writing :unset +c
in the REPL buffer resolves the problem.
Is there a way to set it automatically? I tried setting
(haskell-interactive-set-+c nil)
but to no avail.