<div dir="ltr">Sounds good to me.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 25, 2014 at 11:18 AM, Simon Peyton Jones <span dir="ltr"><<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif"">There’s a danger of disappearing into a bikeshed here.  I think it’s clear that:<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><u></u><span style="font-family:"Calibri","sans-serif"">If we have it at all, ExtraCommas should be a {-# LANGUAGE ExtraCommas #-} extension, like any other.<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><u></u><span style="font-family:"Calibri","sans-serif"">ExtraCommas should leave tuples alone (always)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif"">Provided there is that LANGUAGE extension, I have no objection to having it in GHC if Alexander wants to implement it.  It has low impact, and some people like
 it a lot.  People who don’t like it don’t have to switch on the extension.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif"">It’s unclear whether extra commas in literal lists [a,,b,,] should behave like TupleSections or like ExtraCommas.  My instinct is the former, because the only difference
 is round vs square parens.    That would suggest continuing to make extra commas illegal in literal lists, for now anyway.  That’s a conservative choice, which is usually the side to err on when it’s a toss-up.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif"">OK?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif"">Simon<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> Iavor Diatchki [mailto:<a href="mailto:iavor.diatchki@gmail.com" target="_blank">iavor.diatchki@gmail.com</a>]
<br>
<b>Sent:</b> 25 September 2014 08:14<br>
<b>To:</b> Alexander Berntsen<br>
<b>Cc:</b> Edward Kmett; Simon Peyton Jones; <a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<b>Subject:</b> Re: Permitting trailing commas for record syntax ADT declarations<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hello,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">My 2c: I don't think that supporting trailing commas is worth the additional complexity to the compiler and the language.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I work with Haskell on a daily basis, and I honestly don't think that this is going to simplify my job in any way.  On the other hand, it seems like it it will make it more complex to write tools that process Haskell, and to explain the
 syntax of the language to beginners.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">-Iavor<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Wed, Sep 24, 2014 at 12:38 PM, Alexander Berntsen <<a href="mailto:alexander@plaimi.net" target="_blank">alexander@plaimi.net</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA256<br>
<br>
On 24/09/14 08:50, Edward Kmett wrote:<br>
> I'm personally of the "it should be a language extension like<br>
> everything else" mindset<br>
Yeah, I'm going the Pragma route.<br>
<br>
> If we limit it to record-like notions, and import/export lists,<br>
> then we don't have to deal with conflicts with TupleSections and<br>
> while it is inconsistent to have tuples behave differently, than<br>
> other comma-separated lists, I'd really rather retain tuple<br>
> sections, which I use somewhat heavily, than lose them to mindless<br>
> uniformity over how we handle comma-separated lists.<br>
I'm implementing it for things where I 100% subjectively feel it makes<br>
sense. This does *not* include tuples, for the reason you mention.<br>
<br>
When I get the time, I will make a Wiki page outlining what I'm changing<br>
and my motivation for doing it. We can then have a discussion about<br>
where to draw the line.<br>
<br>
<br>
I need to figure out a more elegant solution than tweaking the parser<br>
for each individual item. If someone knows their way around this code,<br>
please talk to me on IRC/SIP/XMPP/whatever. Just email me for contact<br>
info. I'll be busy today with a haskell workshop, but I plan on<br>
spending the rest of the week on this business.<br>
- --<br>
Alexander<br>
<a href="mailto:alexander@plaimi.net" target="_blank">alexander@plaimi.net</a><br>
<a href="https://secure.plaimi.net/~alexander" target="_blank">https://secure.plaimi.net/~alexander</a><br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2<br>
Comment: Using GnuPG with Thunderbird - <a href="http://www.enigmail.net/" target="_blank">
http://www.enigmail.net/</a><br>
<br>
iF4EAREIAAYFAlQinw4ACgkQRtClrXBQc7VL4gD6Ao12HqH1Mjl30n/1Mwlby7W6<br>
/2+JeUOF9ui959xh1QkBAIdTA6km9gDvgCQ1nBQ5juZFNF79C1Fezk2yEpOvF7Fe<br>
=l/sh<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">-----END PGP SIGNATURE-----<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>

<br>_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div>