[Haskell-cafe] Re: Polymorphic (typeclass) values in a list?

Peter Hercek peter at syncad.com
Sun Oct 21 06:41:10 EDT 2007

Brandon S. Allbery KF8NH wrote:
> On Oct 19, 2007, at 12:11 , Sebastian Sylvan wrote:
>> On 19/10/2007, Kalman Noel <kalman.noel at bluebottle.com> wrote:
>>>    data ExistsNumber = forall a. Num a => Number a
>> I'm without a Haskell compiler, but shouldn't that be "exists a."?
> The problem is that "exists" is not valid in either Haskell 98 or any 
> current extension, whereas "forall" is a very common extension.  But you 
> can simulate "exists" via "forall", which is the thrust of these 
> approaches.

When 'exists' is not a keyword, why 'forall' is needed at all?
Isn't everything 'forall' qualified by default? ... or are type
variables sometimes 'exists' qualified by default depending
on context? That would be confusing though...
I do not understand why 'forall' keyword is needed.


More information about the Haskell-Cafe mailing list