#5112: Incorrect warnings about unqualified imports being redundant
-------------------------------+--------------------------------------------
    Reporter:  sciolizer       |       Owner:                                   
        Type:  bug             |      Status:  new                              
    Priority:  normal          |   Component:  Compiler                         
     Version:  7.0.2           |    Keywords:                                   
    Testcase:                  |   Blockedby:                                   
          Os:  Linux           |    Blocking:                                   
Architecture:  x86_64 (amd64)  |     Failure:  Incorrect warning at compile-time
-------------------------------+--------------------------------------------
 Mixing qualified and unqualified imports can confuse the compiler.

 To reproduce:

 Create the file BadWarning.hs.
 {{{
 module BadWarning where

 import Data.Map
 import qualified Data.Map as M

 example = empty
 }}}

 Run `ghci -W BadWarning.hs`, and you get:

 {{{
 BadWarning.hs:4:1:
     Warning: The import of `Data.Map' is redundant
                except perhaps to import instances from `Data.Map'
              To import instances alone, use: import Data.Map()
 Ok, modules loaded: BadWarning.
 }}}

 This looks similar to #3992, but that bug does not repro for me, so I
 think the issue is slightly different.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5112>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to