Warnings for redundant imports doesn't take name shadowing into account (Regression)
module Log where import Prelude hiding (log) f :: () f = log where log = ()
Compiling this with -Wall On GHC 7.8.2:
> ghc Log.hs -Wall [1 of 1] Compiling Log ( Log.hs, Log.o ) Log.hs:3:1: Warning: The import of ‘Prelude’ is redundant except perhaps to import instances from ‘Prelude’ To import instances alone, use: import Prelude()
The suggestion is incorrect since removing the import statement gives the following warning:
Log.hs:4:15: Warning: This binding for ‘log’ shadows the existing binding imported from ‘Prelude’ at Log.hs:1:8-10 (and originally defined in ‘GHC.Float’)
On GHC 7.6.3 the Reproduction does not give any warnings (which is correct).