#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 | Patch: 0
----------------------------------------+-----------------------------------
Changes (by igloo):
* status: new => closed
* resolution: => invalid
Comment:
When someone calls
{{{
g :: (Cfoo b) => Bar -> b
}}}
they get to choose what type to use for `b`. They can choose any type for
which there is a `Cfoo` instance.
For example,
{{{
fromInteger 5
}}}
has type
{{{
(Num a) => a
}}}
so I can use it with type `Int` or `Double`. `fromInteger`'s
implementation can't always return an `Int`.
If that doesn't clarify it, I suggest you ask on the
[http://www.haskell.org/mailman/listinfo/haskell-cafe haskell-cafe]
mailing list.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3958#comment:3>
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