Permitting trailing commas for record syntax ADT declarations

Iavor Diatchki iavor.diatchki at
Thu Sep 25 07:13:42 UTC 2014


My 2c: I don't think that supporting trailing commas is worth the
additional complexity to the compiler and the language.

I work with Haskell on a daily basis, and I honestly don't think that this
is going to simplify my job in any way.  On the other hand, it seems like
it it will make it more complex to write tools that process Haskell, and to
explain the syntax of the language to beginners.


On Wed, Sep 24, 2014 at 12:38 PM, Alexander Berntsen <alexander at>

> Hash: SHA256
> On 24/09/14 08:50, Edward Kmett wrote:
> > I'm personally of the "it should be a language extension like
> > everything else" mindset
> Yeah, I'm going the Pragma route.
> > If we limit it to record-like notions, and import/export lists,
> > then we don't have to deal with conflicts with TupleSections and
> > while it is inconsistent to have tuples behave differently, than
> > other comma-separated lists, I'd really rather retain tuple
> > sections, which I use somewhat heavily, than lose them to mindless
> > uniformity over how we handle comma-separated lists.
> I'm implementing it for things where I 100% subjectively feel it makes
> sense. This does *not* include tuples, for the reason you mention.
> When I get the time, I will make a Wiki page outlining what I'm changing
> and my motivation for doing it. We can then have a discussion about
> where to draw the line.
> I need to figure out a more elegant solution than tweaking the parser
> for each individual item. If someone knows their way around this code,
> please talk to me on IRC/SIP/XMPP/whatever. Just email me for contact
> info. I'll be busy today with a haskell workshop, but I plan on
> spending the rest of the week on this business.
> - --
> Alexander
> alexander at
> Version: GnuPG v2
> Comment: Using GnuPG with Thunderbird -
> iF4EAREIAAYFAlQinw4ACgkQRtClrXBQc7VL4gD6Ao12HqH1Mjl30n/1Mwlby7W6
> /2+JeUOF9ui959xh1QkBAIdTA6km9gDvgCQ1nBQ5juZFNF79C1Fezk2yEpOvF7Fe
> =l/sh
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list