>
> Basically, quantified types can't be given as arguments to type
>> constructors (other than ->, which is its own thing). I'm not entirely
>> sure
>> why, but it apparently makes the type system very complicated from a
>> theoretical standpoint. By wrapping the quantified type in a newtype, the
>> argument to IO becomes simple enough not to cause problems.
>
>
Thank you, I have read about predicative types and it seems I understand
the origin of the problem now.


>  GHC has an extension -XImpredicativeTypes that lifts this restriction,
> but in my experience, it doesn't work very well.
>

Yes, it didn't help in my case.

Thank you,
Dmitry
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to