Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,391
    • Issues 4,391
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 371
    • Merge Requests 371
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #532

Closed
Open
Opened Apr 11, 2001 by lewie@trac-lewie

5.0: .hi files should indicate origin

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 

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

./ShouldSucceed.hi:8:
    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.

Trac metadata
Trac field Value
Version None
Type Bug
TypeOfFailure OtherFailure
Priority low
Resolution ResolvedWon'tFix
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#532