Ticket #1074 (closed bug: fixed)
-fwarn-unused-imports complains about wrong import
| Reported by: | guest | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.12.1 |
| Component: | Compiler | Version: | 6.6 |
| Keywords: | Cc: | jyasskin@…, ganesh.sittampalam@…, gwern0@…, johan.tibell@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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()
$
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

