Proposal: Deprecate ExistentialQuantification

Stefan Holdermans stefan at cs.uu.nl
Sun Jun 28 07:24:53 EDT 2009


Niklas,

> What you really want or mean when you use
> the classic syntax with existential quantification is
>
>> data Foo = Foo (exists a . (Show a) => a)
>
> Having that would make a lot more sense, and would fit well together
> with the intuition of the classic syntax.

How would you then define

   data Foo :: * where
     Foo :: forall a. a -> a -> Foo

in which the scope of existentially quantified type variable spans  
more than one field?

Cheers,

   Stefan


More information about the Haskell-prime mailing list