[Haskell-cafe] forall and a parse error

Neil Mitchell ndmitchell at gmail.com
Mon Jul 3 16:04:47 EDT 2006

On 7/3/06, David House <dmhouse at gmail.com> wrote:
> On 03/07/06, Neil Mitchell <ndmitchell at gmail.com> wrote:
> > In normal Haskell, I tend to view [x] as equivalent to [(x)] (provided
> > that x is not a tuple) but in this case it has a different meaning -
> > albeit both are erronous meanings.
> How would tuples make a difference?

[1,2] /= [(1,2)] - the brackets have changed the semantics, because of
the tupling. Haskell has two distinct types of brackets, (x) for
grouping, (x,y) for tupling. For that reason, there is no way to write
the 1 item tuple - despite the fact that some compilers (Yhc/nhc)
define and use it internally.



More information about the Haskell-Cafe mailing list