[GHC] #1074: -fwarn-unused-imports complains about wrong import
GHC
trac at galois.com
Sat Dec 30 02:51:36 EST 2006
#1074: -fwarn-unused-imports complains about wrong import
-------------------------+--------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.6
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Architecture: powerpc | Os: MacOS X
-------------------------+--------------------------------------------------
If a symbol is accessible through multiple imports, ghc seems to complain
about the first one, even if that's the one it's actually accessed
through.
{{{
$ cat Test.hs
module Test where
import qualified Control.Monad (ap)
import qualified Control.Monad.Reader
foo :: IO ()
foo = return id `Control.Monad.ap` return ()
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6
$ ghc -c Test.hs -Werror -fwarn-unused-imports
Test.hs:3:0:
Warning: Module `Control.Monad' is imported, but nothing from it is
used,
except perhaps instances visible in `Control.Monad'
To suppress this warning, use: import Control.Monad()
$
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1074>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list