[GHC] #870: extra commas accepted in import export lists

Neil Mitchell ndmitchell at gmail.com
Sun Aug 20 08:08:08 EDT 2006


Hi Bulat,

> as Duncan said, it's Good Thing. i permanently use this trick in the
> export lists. it's much better to change Haskell standard :)

Really?

I can perfectly understand that

(export1,
 export2,
)

is a useful thing to have - now that last element is not special in
any way, and so if you are conditionally preprocessing you don't need
to figure out future elements to get this element right.

Note that this proposal and patch still allows that.

Now what is disallows is

(,,,,,,,,,,,,,export1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
 export2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
)

do you really have a preprocessor situation where something like this
comes up? Can't you just move the comma's inside the conditional? It
seems a more structured and well thought out use of preprocessing if
you keep the comma's correct.

This issue has broken the Hugs library builds quite a few times - and
I can fully understand that Ross wants things to stop breaking in Hugs
land!

Thanks

Neil



More information about the Glasgow-haskell-bugs mailing list