Opened 13 years ago

Closed 12 years ago

Last modified 48 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: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Pointed out by John Meacham []

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 12 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 12 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 12 years ago by simonpj

Status: assignedclosed
Note: See TracTickets for help on using tickets.