#2706: Associated data type doesn't infer context
------------------------------+---------------------------------------------
Reporter: ajd | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 6.8.3
Severity: normal | Resolution: invalid
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown/Multiple
Os: Unknown/Multiple |
------------------------------+---------------------------------------------
Changes (by simonpj):
* status: new => closed
* difficulty: => Unknown
* resolution: => invalid
Comment:
I'm afraid the error message is fine. `(Baz a)` does not have an `Eq`
instance.
It's true that if you have a `(Foo a)` dictionary then you have a `Bar
(Baz a)` dictionary (since that's a superclass), and hence you have an `Eq
(Baz a)` dictionary (since `Eq` is a superclass of `Bar`).
But you don't have a `(Foo a)` dictionary in the derived instance.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2706#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs