#3958: method definitions fail to refer to method-context classes
----------------------------------------+-----------------------------------
Reporter: visionete | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 6.12.1
Resolution: invalid | Keywords:
Difficulty: | Os: Linux
Testcase: | Architecture: x86_64 (amd64)
Failure: GHC rejects valid program |
----------------------------------------+-----------------------------------
Changes (by simonpj):
* status: new => closed
* resolution: => invalid
Comment:
The error message is quite right. 'g' has type
{{{
g :: forall a b. (CBar a, CFoo b) => a -> b
}}}
In the instnace for `CBar Bar`, g must therefore have type
{{{
g :: forall b. CFoo b => Bar -> b
}}}
But it doesn't. The right hand side `(F f)` fixes the result type as
`Foo`, not `b`.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3958#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