Opened 11 years ago

Closed 10 years ago

Last modified 46 years ago

#324 closed bug (Fixed)

Over-zealous dup-import warning

Reported by: simonpj Owned by: simonpj
Priority: low Milestone:
Component: Compiler Version: None
Keywords: Cc:
Operating System: Architecture:
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):


Pointed out by John Meacham [[email protected]]

In 6.4 the duplicate import warning seems to be 
triggered overzealously, even
when one import is qualified and the other isn't.

import qualified Data.Map 
import Data.Map(Map)

foo :: Map Int Int
foo = Data.Map.empty
main = do
    print foo
    Warning: `Map' is imported more than once:
               imported from Data.Map at Foo.hs:3:16-18
               imported from Data.Map at Foo.hs:2:0-24

Change History (3)

comment:1 Changed 10 years ago by fergus

Logged In: YES 

Yes, this one is a pain -- it would be great if someone
would fix this.
The only work-around I have at the moment is to use "-Wall
-fno-warn-unused-imports" instead of "-Wall".
   - Fergus Henderson.

comment:2 Changed 10 years ago by simonpj

Logged In: YES 

OK, I've fixed this.  I've changed the message to focus on 
each import and report if it is redundant; that is, is completely 
covered by another import. (Instead of reporting on some 
overlap, in a symmetrical way.)

I hope this should be a big improvement; let me know if not.


comment:3 Changed 10 years ago by simonpj

  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.