#1074: -fwarn-unused-imports complains about wrong import
---------------------------------+------------------------------------------
    Reporter:  guest             |        Owner:  igloo           
        Type:  bug               |       Status:  new             
    Priority:  high              |    Milestone:  6.10 branch     
   Component:  Compiler          |      Version:  6.6             
    Severity:  minor             |   Resolution:                  
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Comment (by duncan):

 I've added a test case (based on the tar package). The expected outcome is
 no warnings with -Wall. The current outcome is:

 {{{
 Test.hs:3:0:
     Warning: Module `System.FilePath' is imported, but nothing from it is
 used,
                except perhaps instances visible in `System.FilePath'
              To suppress this warning, use: import System.FilePath()
 }}}

 The specific instance of the problem in this test case is that we import:
 {{{
 import qualified System.FilePath         as FilePath.Native
 import qualified System.FilePath.Posix   as FilePath.Posix
 import qualified System.FilePath.Windows as FilePath.Windows
 }}}
 and use things qualified from all three of them. The `System.FilePath`
 module is a re-export of one of the other two modules (but which one
 depends on the platform).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1074#comment:19>
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