proposal for trailing comma and semicolon

Ian Lynagh ian at
Fri May 17 21:01:29 CEST 2013

On Fri, May 17, 2013 at 02:04:44PM -0400, Edward Kmett wrote:
> My main concern is its a really weird corner case for the grammar to
> remember for tuple sections and it does have very weird grammar
> specification issues.

Tuple sections could look like
    (True, _)
rather than

Does anyone know how common tuple sections are, incidentally? They've
been around since GHC 6.12, so it would be interesting to know if people
are actually using them.

> I really have no objection to it for the other cases. It'd make export
> lists cleaner,

Actually, you are already allowed an extra trailing comma in import and
export lists.

> maybe a few other cases, but how often can you really say
> you can meaningfully comment out one field of a tuple have have the
> surrounding code make any sense?

It happens occasionally, especially when simplifying code while

Commenting out list items is much more common, though.

I'd be in favour of allowing a trailing or leading comma anywhere that
comma is used as a separator. TupleSections would need to be changed or
removed, though.

Ian Lynagh, Haskell Consultant
Well-Typed LLP,

More information about the Haskell-prime mailing list