[Haskell-cafe] Rank-2 polymorphism and overloading

Thomas van Noort thomas at cs.ru.nl
Mon Apr 26 14:55:16 EDT 2010

On 26-4-2010 20:12, Daniel Fischer wrote:
> Am Montag 26 April 2010 19:52:23 schrieb Thomas van Noort:
>> ...
> Yes, y's type is more general than the type required by f, hence y is an
> acceptable argument for f - even z :: forall a b. a ->  b ->  Bool is.

That's what I thought. I've just never seen such a notion of a more 
general type involving overloading before.

>> However, it requires y to throw away the provided
>> dictionary under the hood, which seems counter intuitive to me.
> Why? y doesn't need the dictionary, so it just ignores it.

Sure, but y's type explicitly mentions that it doesn't want a 
dictionary, so why would you provide one to it?

>> Regards,
>> Thomas


More information about the Haskell-Cafe mailing list