[Haskell-cafe] Comma in the front

Neil Mitchell ndmitchell at gmail.com
Thu Jul 13 20:01:23 EDT 2006


>     [
>        a,
>        b,
>        c,
>     ]
> I'm surprised this approach isn't more widespread - Are there reasons
> why
> haskell syntax could not/should not be defined this way?

I believe GHC allows multiple commas after each other in some places,
for example module export lists. Unfortunately the only reason I know
this is because it broke code for Hugs. I don't think its technically
infeasible to do this, it was just not decided upon at the time. There
might be issues with tuples though, for example (1,2,) would be the
(,) tuple and not the (,,) tuple, which is a bit weird.



More information about the Haskell-Cafe mailing list