[Haskell-cafe] Re: Type question in instance of a class
Peter Hercek
phercek at gmail.com
Sun Nov 16 19:06:08 EST 2008
Bulat Ziganshin wrote:
> Hello J.,
>
> Monday, November 17, 2008, 12:56:02 AM, you wrote:
>
>>> class MyClass r where function :: r -> s
>> As Bulat said, your type signature is equivalent to:
>
>> function :: forall r s. r -> s
>
> only
>
> function :: forall s. r -> s
>
> (r is fixed in class header)
>
... and the only value the function can return is bottom.
Is there any type system which would have more than
one value which inhabits all types?
Peter.
More information about the Haskell-Cafe
mailing list