
From: "Simon Peyton-Jones"
To: "GHC users" , > Dear GHC users, Hugs users, and Hugs implementors Many of you have grown to love existential data types, which we current write like this:
data T = forall a. Foo a (a -> Int)
Mark and I chose 'forall' rather than 'exists' to save grabbing another keyword from the programmer. And indeed, the type of the constructor Foo is Foo :: forall a. a -> (a->Int) -> T
But every single time I explain this to someone, I find I have to make excuses for using the term 'forall'. I say "it really means 'exists', but we didn't want to lose another keyword".
I have gradually concluded that our decision was a mistake.
looks like it!
(In fairness to Mark, I think I was the primary advocate for it.) I reckon that we should
Allow 'exists' Deprecate 'forall' (for defining existentials, that is) Eventually allow only 'exists'
Does anyone have any opinions on this topic? It's a small point, but one that bites quite frequently. It might even be possible to arrange that 'forall' and 'exists' were only keywords in types, and not in terms, but I'm not sure it's worth the bother.
I would have said it _was_ worth the bother. Both forall and exists are very useful function names, in my opinion.
I don't think it affects NHC, because it's not H98 anyway.
Simon
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
----------------------------------------------------------------------- War in Iraq: NOT in my name. The war is killing civilians in the name of saving them and is likely to cause a huge humanitarian crisis. Join the StWC at http://www.stopwar.org.uk/ and make your opposition known http://www.sheffieldagainstwar.org.uk/ Matt Fairtlough 0114-22-21826 http://www.dcs.shef.ac.uk/~matt/ This signature is long and may not reflect the views of my employers. -----------------------------------------------------------------------