[Haskell-cafe] what is a difference between existential quantification and polymorhic field?

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Sep 21 05:45:02 EDT 2006


Hello Ross,

Thursday, September 21, 2006, 12:55:40 PM, you wrote:

>> data Ex = forall a. Num a =>  Ex a
>> 
>> and
>> 
>> data Po = Po (forall a. Num a => a)

> Consider the types of the constructors:

> Ex :: forall a. (Num a) => a -> Ex
> Po :: (forall a. (Num a) => a) -> Po

sorry, Ross, can you give me a more detailed explanation? it seems
that Po argument is existential by itself, but i don't understand that
all this mean

also, ghc66 adds impredicative polymorphism. how it differs from
unqualified existentials?


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list