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

2011-07-12 Thread Christian Maeder
Generally allowing trailing (or leading or repeated) commas would clash with tuple sections. Also the pair constructor "(,)" is a special case. http://www.haskell.org/ghc/docs/7.0.4/html/users_guide/syntax-extns.html#tuple-sections Cheers Christian Am 11.07.2011 12:09, schrieb Joachim Breitner

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

2011-07-11 Thread Henning Thielemann
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

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

2011-07-11 Thread Johan Tibell
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 se

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

2011-07-11 Thread Malcolm Wallace
> That just shifts the problem, I think? Now you can no longer comment out the > first line. If you are using to-end-of-line comments with --, then the likelihood of noticing a leading ( or { on the line being commented, is much greater than the likelihood of noticing a trailing comma on the

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

2011-07-11 Thread Joachim Breitner
Hi, Am Montag, den 11.07.2011, 10:49 +0200 schrieb L Corbijn: > You could of course say that I'm using a bad style, but it remains > that it seems to be inconsistent to allow a trailing comma in one > place and not in the other. So is there an reason for this? there is actually a bug report again

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

2011-07-11 Thread Johan Tibell
On Mon, Jul 11, 2011 at 11:51 AM, Sjoerd Visscher wrote: > > On Jul 11, 2011, at 11:42 AM, Jack Henahan wrote: > >> Well, for your example frustration, the leading comma style would sort your >> problem nicely. As for the particulars… hmm, not sure. I use leading commas >> for both, so I never r

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

2011-07-11 Thread Sjoerd Visscher
On Jul 11, 2011, at 11:42 AM, Jack Henahan wrote: > Well, for your example frustration, the leading comma style would sort your > problem nicely. As for the particulars… hmm, not sure. I use leading commas > for both, so I never really noticed. That just shifts the problem, I think? Now you ca

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

2011-07-11 Thread Christopher Done
On 11 July 2011 10:49, L Corbijn wrote: > You could of course say that I'm using a bad style, but it remains that it > seems to be inconsistent to allow a trailing comma in one place and not in > the other. So is there an reason for this? I've also noticed that I can write data X = X deriving Sh

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

2011-07-11 Thread Jack Henahan
Well, for your example frustration, the leading comma style would sort your problem nicely. As for the particulars… hmm, not sure. I use leading commas for both, so I never really noticed. It may be that since modules simply expose functions to other programs, the form is syntactically irreleva

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

2011-07-11 Thread L Corbijn
Hello, I'm wondering why the trailing comma is allowed in export syntax, but not in record syntax, here an example module Foo ( export1, -- is allowed ) where data Type = Type { record1 :: Foo, -- is not allowed } To me this seems quite inconsistent and sometimes quite frustrating, imag