Re: [Haskell-cafe] Inconsistent trailing comma in export list and record syntax

On Mon, Jul 11, 2011 at 3:54 PM, Henning Thielemann
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.
Sorry, I wasn't being clear. I meant for import/export lists. Johan

On Mon, 11 Jul 2011, Johan Tibell wrote:
On Mon, Jul 11, 2011 at 3:54 PM, Henning Thielemann
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.
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,))
participants (2)
-
Henning Thielemann
-
Johan Tibell