<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Calibri Light";
        panose-1:2 15 3 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
h2
        {mso-style-priority:9;
        mso-style-link:"Heading 2 Char";
        margin-top:2.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Calibri Light",sans-serif;
        color:#2F5496;
        mso-fareast-language:EN-US;
        font-weight:normal;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:36.0pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
p.Code, li.Code, div.Code
        {mso-style-name:Code;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:22.7pt;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New",serif;
        mso-fareast-language:EN-US;
        font-weight:bold;}
span.Heading2Char
        {mso-style-name:"Heading 2 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 2";
        font-family:"Calibri Light",sans-serif;
        color:#2F5496;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:521865631;
        mso-list-template-ids:2082880874;}
@list l1
        {mso-list-id:958335912;
        mso-list-template-ids:-1106481294;}
@list l1:level1
        {mso-level-start-at:3;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2
        {mso-list-id:1496342541;
        mso-list-type:hybrid;
        mso-list-template-ids:879761478 134807567 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l2:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l3
        {mso-list-id:1570963960;
        mso-list-type:hybrid;
        mso-list-template-ids:-2056461946 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l3:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l3:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New",serif;}
@list l3:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l3:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l3:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New",serif;}
@list l3:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l3:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l3:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New",serif;}
@list l3:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Friends<o:p></o:p></p>
<p class="MsoNormal">Sorry for dragging my feet here.   <o:p></o:p></p>
<p class="MsoNormal">Only Joachim, Arnaud, Simon, and Eric responded to my message below.   If that means that the rest of you don’t mind either way, that’s fine. But if you have an opinion, please say so in the next 24 hrs.<o:p></o:p></p>
<p class="MsoNormal">No one seems keen on (1).<o:p></o:p></p>
<p class="MsoNormal">Everyone seems on the fence between (2) and (3).<o:p></o:p></p>
<p class="MsoNormal">Personally I prefer (2) over (3).  I’m very uncomfortable about an infix white-space operator that binds more tightly than function application.  Consider  (f .x g .y h .z)<o:p></o:p></p>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l3 level1 lfo5">(2) says this means ((((f .x) g) .y) h) .z), so that it parenthesises exactly like function application.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l3 level1 lfo5">(3) says it means (((f .x) (g .y)) (h .z)) which, while unambiguous, I dislike cordially.<o:p></o:p></li></ul>
<p class="MsoNormal">I propose to adopt (2).  We can vote if need be, but I’d like to hear from anyone who thinks that’s a wrong choice.  Clearly it’s a judgement call.<o:p></o:p></p>
<p class="MsoNormal">Simon<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></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" style="margin:0cm;margin-bottom:.0001pt"><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> Simon Peyton Jones <simonpj@microsoft.com>
<br>
<b>Sent:</b> 07 January 2020 11:29<br>
<b>To:</b> ghc-steering-committee@haskell.org<br>
<b>Cc:</b> Simon Peyton Jones <simonpj@microsoft.com><br>
<b>Subject:</b> Record syntax<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Friends<o:p></o:p></p>
<p class="MsoNormal">I’d like to move our record-syntax discussion forward.  Link to
<a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fghc-proposals%2Fghc-proposals%2Fpull%2F282&data=02%7C01%7Csimonpj%40microsoft.com%7Ca982a7a9c68f4a7b4a3808d79364cd25%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637139933453096241&sdata=ITgdpzLSfuPL9ZlqoPt6NQpiPNlXcJGRIkgBLkRD4hE%3D&reserved=0">
proposal discussion</a>, and <a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.haskell.org%2Fpipermail%2Fghc-steering-committee%2F2019-December%2Fthread.html%231387&data=02%7C01%7Csimonpj%40microsoft.com%7Ca982a7a9c68f4a7b4a3808d79364cd25%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637139933453106239&sdata=okRmErY9Rw0Y2tY4pPXPyuZtOCwj%2FG8BMqz9sxPtNOA%3D&reserved=0">
December GHC steering committee debates</a>.<o:p></o:p></p>
<h2><b>No-space arguments<o:p></o:p></b></h2>
<p class="MsoNormal">I believe have agreed that <o:p></o:p></p>
<p class="MsoNormal">               f r.x<o:p></o:p></p>
<p class="MsoNormal">(with no spaces around the dot, and no parens around r.x) means<o:p></o:p></p>
<p class="MsoNormal">               f (r.x)<o:p></o:p></p>
<p class="MsoNormal">That is, treat it consistently with qualified names.  I asked everyone to express a view; Iavor, Eric, Arnaud, Joachim, and Richard all said it was at least acceptable; others expressed no view.  So let’s take that as a decision, at least
 for now.<o:p></o:p></p>
<h2><b>Naked selectors<o:p></o:p></b></h2>
<p class="MsoNormal">Next question: how should we treat a “naked selector”, namely .x where there is no space after the dot, but there is a space before.  I think there are three viable choices:<o:p></o:p></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l2 level1 lfo3"><b>It’s simply illegal</b>.   This defers the choice;  perhaps later we will have more experience to go on.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l2 level1 lfo3"><b>It’s a postfix operator</b>, binding less tightly than function application, but more tightly than any infix operator.   So then (r .x) means r.x, and (r .x .y) means r.x.y.   But
 (f r .x) means (f r).x.<o:p></o:p></li></ol>
<p class="MsoListParagraph">This choice naturally supports chaining (nice to have, but not essential).  We can write<o:p></o:p></p>
<p class="Code" style="margin-left:72.0pt">f .map double<o:p></o:p></p>
<p class="Code" style="margin-left:72.0pt">  .filter isEven<o:p></o:p></p>
<p class="MsoListParagraph">meaning <b><span style="font-family:"Courier New",serif">(f.map double).filter isEven</span></b><o:p></o:p></p>
<ol style="margin-top:0cm" start="3" type="1">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l2 level1 lfo3"><b>It’s a postfix operator</b>, binding more tightly than function application, just as record update does.  So then (f r .x) means (f r.x), and (f r .x .y s .z) means (f r.x.y s.z).<o:p></o:p></li></ol>
<p class="MsoListParagraph">This choice allows us to regard our decision about (f r.x) as what naturally happens if we parse it as three lexemes: f, r, and .x.  But it also breaks the “function application binds more tightly than anything else” rule, just as
 (f r {x=3}) sadly does already.<o:p></o:p></p>
<p class="MsoListParagraph">It does not permit chaining, at least not without stacked-up parens.<o:p></o:p></p>
<p class="MsoNormal">In all three cases we allow (.x), meaning (\r. r.x).   For (2) and (3) we can regard it as a “section”, like infix operators only simpler because there is no argument.<o:p></o:p></p>
<p class="MsoNormal">I think this is the last major question we have to answer.<o:p></o:p></p>
<p class="MsoNormal">What are your views?   Personally I lean towards (2), but I could certainly live with (1).  I’m a bit reluctant to adopt (3).<o:p></o:p></p>
<p class="MsoNormal">Simon<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>