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

2006-09-21 Thread Bulat Ziganshin
Hello haskell-cafe, now i'm reading Haskell' proposals and found that these two things considered as different: http://hackage.haskell.org/trac/haskell-prime/wiki/ExistentialQuantification http://hackage.haskell.org/trac/haskell-prime/wiki/PolymorphicComponents can you please explain me what is

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

2006-09-21 Thread Ross Paterson
[apologies to Bulat for the repeat posting] On Thu, Sep 21, 2006 at 12:05:23PM +0400, Bulat Ziganshin wrote: now i'm reading Haskell' proposals and found that these two things considered as different: http://hackage.haskell.org/trac/haskell-prime/wiki/ExistentialQuantification

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

2006-09-21 Thread Bulat Ziganshin
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

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

2006-09-21 Thread Bruno Oliveira
Hello Bullat, now i'm reading Haskell' proposals and found that these two things considered as different: http://hackage.haskell.org/trac/haskell-prime/wiki/ExistentialQuantification http://hackage.haskell.org/trac/haskell-prime/wiki/PolymorphicComponents can you please explain me

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

2006-09-21 Thread Bruno Oliveira
Hello Bullat, also, ghc66 adds impredicative polymorphism. how it differs from unqualified existentials? I have not tried ghc66, but I think one of the things you should be able to do and that is perhaps helpful for understanding existencial is: myList :: [forall a . Num a = a]