Ticket #3419 (closed bug: wontfix)
Incorrect "unnecessary import" warning
| Reported by: | NeilMitchell | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.12.1 |
| Component: | Compiler | Version: | 6.10.4 |
| Keywords: | Cc: | ndmitchell@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
With the code:
{-# OPTIONS_GHC -Wall -fno-warn-missing-methods #-}
module Test where
import Data.Typeable
import Data.Data
data Test = Test
instance Typeable Test where
I get the warning:
Warning: Module `Data.Typeable' is imported, but nothing from it is used
except perhaps instances visible in `Data.Typeable'
To suppress this warning, use: import Data.Typeable()
It seems like it's decided to pick up Typeable from Data.Data, but it's also available from Data.Typeable which would be a better choice. I'm not sure how this should be solved, but the current behaviour seems incorrect. Perhaps if two modules are imported, both of which export the same thing, they should both be allowed.
Change History
Note: See
TracTickets for help on using
tickets.
