[GHC] #2356: GHC accepts multiple instances for the same type
in different modules
GHC
trac at galois.com
Tue Jun 10 15:26:45 EDT 2008
#2356: GHC accepts multiple instances for the same type in different modules
-------------------------+--------------------------------------------------
Reporter: claus | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.8.2
Severity: normal | Resolution:
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
-------------------------+--------------------------------------------------
Changes (by guest):
* cc: lennart at augustsson.net (added)
Comment:
This really surprises me. Why doesn't think produce a link error?
Each instance declaration should give rise to a global symbol uniquely
determined by the class and the type, I'd presume. And when they meet
there will be a clash.
Obviously I'm wrong, as this (scary) example shows.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2356#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list