[Haskell-cafe] Inconsistent trailing comma in export list and record syntax
Henning Thielemann
lemming at henning-thielemann.de
Mon Jul 11 19:25:39 CEST 2011
On Mon, 11 Jul 2011, Johan Tibell wrote:
> On Mon, Jul 11, 2011 at 3:54 PM, Henning Thielemann
> <thunderbird at henning-thielemann.de> wrote:
>> Johan Tibell wrote:
>>> I've found this quite annoying, especially when using CPP to
>>> conditionally include something in a list, as it might force you to
>>> reorder the list to make the commas appear correctly when the
>>> conditional section is enabled/disabled.
>>
>> In this case I use the colon like a terminator.
>>
>> http://www.haskell.org/haskellwiki/List_notation
>
> Sorry, I wasn't being clear. I meant for import/export lists.
But in import/export lists you can use the trailing comma, and thus you
can conditionally export or import identifiers at any position. However,
the trailing comma is forbidden in enumerations of constructors. E.g.
import M (R, S, T, )
is allowed, but not
import M (T(A,B,C,))
More information about the Haskell-Cafe
mailing list