[Haskell-cafe] Type inference

Brian Hulley brianh at metamilk.com
Thu Feb 9 01:09:00 EST 2006

Brian Hulley wrote:
> Brian Hulley wrote:
>> Brian Hulley wrote:
>>>          f :: (forall a m. a -> m a) -> c -> d -> (m c, m d)
>> The above is wrong - there is no way to quantify m properly. This
>> must be why intersection types need to be written with "&" after
>> all....
> What am I saying! It's right after all, and might be better than the &
> syntax because it makes the dependency clearer (assuming you can't
> write a function that is both Int->String  and Float->Int)

Last correction!

f :: forall m. (forall a. a->m a) -> c -> d -> (m c, m d)

Sorry for all this confusion.

More information about the Haskell-Cafe mailing list