Opened 17 years ago

Closed 16 years ago

Last modified 48 years ago

#532 closed bug (Wont Fix)

5.0: .hi files should indicate origin

Reported by: lewie Owned by: nobody
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:


It would be nice if a .hi file indicated its origin. 
Otherwise, if you happen to have two different files
with the same module name, GHC can get confused (or
more importantly, the user can get confused!), because
it has no way of knowing whether it's using the .hi
file from the wrong source file.  This seems a bit of a
marginal case, but it shows up in things like test
suites.  In GHC's tests, tc056.hs and tc057.hs if run
one after the other (as is intended), will fail on
tc057.hs with a warning about something that comes from
the .hi file of test056.

% ghc -c tc056.hs 

    Warning: Duplicate class assertion `Eq' a' in the
		 (Eq' a, Eq' a) => ...
% ghc -c tc057.hs 

    Warning: Duplicate class assertion
`ShouldSucceed.Eq' a' in the context:
		 (ShouldSucceed.Eq' a, ShouldSucceed.Eq' a) => ...

As you might guess, there's no duplicate class
assertion in tc057.hs.

Change History (1)

comment:1 Changed 16 years ago by simonpj

Status: assignedclosed
Logged In: YES 

We discussed this and decided that while in principle it's 
a reasonable idea, the cost-of-implementation doesn't 
justify the benefit.  So wont-fix for now.
Note: See TracTickets for help on using tickets.