Permitting trailing commas for record syntax ADT declarations
Andreas Abel
abela at chalmers.se
Tue Sep 23 07:39:29 UTC 2014
To account for all forms of leading/trailing separators, I suggest to
call the pragma
SpuriousSeparators
or
ExtraSeparators
If you want to do it only for commas, I suggest
ExtraCommas
(not the proper latin plural, which would be ExtraCommata, but certainly
preferable :-)).
On 23.09.2014 09:31, Simon Peyton Jones wrote:
> | > have a language extension TrailingCommas (or something) to enable
> | > the extension
> | For clarification: are you overruling the "do we sneak it in HEAD or
> | use pragma(s)"-vote and telling me to do the latter?
>
> Well, it *is* a language extension, exactly like lots of other language extensions, isn't it? (E.g. UnicodeSyntax.) What alternative action, exactly, are you proposing? Why do you propose to treat it differently to other language extensions? I would be reluctant to simply add it without any indication; then GHC would accept non-Haskell 2010 programs. And we have not done that with other extensions.
>
> Simon
>
> |
> | If we can sneak it into HEAD (this is @ you Johan, too), I suggest
> | that someone applies my patches to make import and export lists
> | support leading commas (presently they only support trailing commas,
> | per the report) -- and following this I can just send a bunch of
> | "Permit leading/trailing ',' in Foo" patches to Phabricator, and you
> | guys can bikeshed over there about which ones you actually want to
> | commit. ;-)
> |
> | If I am to go down the pragma route, I guess I can make a
> | RudundantCommas pragma or something like that, that implements
> | trailing commas for imports/exports, and leading/trailing commas for
> | the suggestions in this thread.
> |
> | I'm +1 on the GHC HEAD route, but I'm not exactly violently opposed to
> | the pragma route either.
> | - --
> | Alexander
> | alexander at plaimi.net
> | https://secure.plaimi.net/~alexander
> | -----BEGIN PGP SIGNATURE-----
> | Version: GnuPG v2
> | Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> |
> | iF4EAREIAAYFAlQhHRoACgkQRtClrXBQc7U0WAD+Ixdah2pHMoeLiTGQJf0JLwDR
> | I2dxYS7yaKyOHuHcUuEBAKh6RQmmpztz82yt/KCw0n2md3pf4n8yc5tt9s9k3FW3
> | =FfHX
> | -----END PGP SIGNATURE-----
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
--
Andreas Abel <>< Du bist der geliebte Mensch.
Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden
andreas.abel at gu.se
http://www2.tcs.ifi.lmu.de/~abel/
More information about the ghc-devs
mailing list