<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=utf-8">
<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
.MsoPapDefault
        {mso-style-type:export-only;
        margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;}
@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:1258516018;
        mso-list-type:hybrid;
        mso-list-template-ids:2087739686 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0: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";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0: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";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0: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";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">In my message on 7<sup>th</sup> I said that the first step would be to identify the alternatives on which we could subsequently vote.   Since then<o:p></o:p></p>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">Joachim suggested (5)<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">I suggested a refinement to that (yesterday), treating r.x as a lexeme like M.x, but otherwise like (5)<o:p></o:p></li></ul>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Does anyone have any other alternatives they actively want to see on the list? Then I’ll gather them together and invite you to express your votes.<o:p></o:p></p>
<p class="MsoNormal"><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"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Spiwack, Arnaud <arnaud.spiwack@tweag.io>
<br>
<b>Sent:</b> 11 February 2020 07:59<br>
<b>To:</b> Simon Peyton Jones <simonpj@microsoft.com><br>
<b>Cc:</b> ghc-steering-committee@haskell.org<br>
<b>Subject:</b> Re: [ghc-steering-committee] Record dot notation<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
I'm swaying back and forth, but I'll go with my gut feeling:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
4>3>2>1<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
On Fri, Feb 7, 2020 at 6:13 PM Simon Peyton Jones via ghc-steering-committee <<a href="mailto:ghc-steering-committee@haskell.org">ghc-steering-committee@haskell.org</a>> wrote:<o:p></o:p></p>
</div>
<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" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
Colleagues<br>
<br>
I've been slow on the records front; apologies.<br>
<br>
I think Joachim is right: we've discussed a lot of options, but in the<br>
end much of this is a judgement call with no perfect answers, and it<br>
now seems simplest to express our judgement through voting. I think<br>
we are all keen to decide this and move on.<br>
<br>
Proposal: <a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fshayne-fletcher-da%2Fghc-proposals%2Fblob%2Frecord-dot-syntax%2Fproposals%2F0000-record-dot-syntax.md&data=02%7C01%7Csimonpj%40microsoft.com%7C2ec11b916c3c40b82aa908d7aec860aa%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637170047953657130&sdata=NWy9iShBf7S4tdyrcRbodn6ndJwzmFXxf%2B9LTkrkTpE%3D&reserved=0" target="_blank">
https://github.com/shayne-fletcher-da/ghc-proposals/blob/record-dot-syntax/proposals/0000-record-dot-syntax.md</a><br>
Lengthy discussion: <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%7C2ec11b916c3c40b82aa908d7aec860aa%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637170047953667118&sdata=hpHYTOzXELGfc2s4lfvY9VyFn58biKD1D0S9a2coq%2FQ%3D&reserved=0" target="_blank">
https://github.com/ghc-proposals/ghc-proposals/pull/282</a><br>
<br>
Here are the alternatives I propose we vote on.  The first order of<br>
business is to check that they are all clear; and that I haven't omitted<br>
a worthy alternative.  Here they are:<br>
<br>
1. Reject the proposal<br>
<br>
2. Naked .x is illegal<br>
<br>
3. Naked .x is a postfix operator, binding exactly<br>
   like application:  f r .x   means (f r).x<br>
<br>
4. Naked .x is a postfix operator, binding more tightly<br>
   than application: f r .x   means   f (r.x)<br>
<br>
Under all of (2,3,4) I think we are content that<br>
  - (f r.x) means  (f (r.x))<br>
  - (.x)    means  (\r -> r.x)<br>
<br>
By "naked .x" I mean "not preceded by an identifier (e.g. r.x),<br>
or an open paren (e.g. (.x)), or a close paren (e.g. (f 3).x)<br>
<br>
We could re-open more of this, but I'd prefer to keep it to 1-4.<br>
<br>
Let's just check everyone is happy with these alternatives.  Then we can<br>
vote by putting in rank order, and Joachim can run his STV algorithm.<br>
<br>
<br>
I'm the shepherd for this proposal, so let me add my recommendations.<br>
<br>
I strongly urge that we do not adopt (1); that is, we accept the<br>
proposal in some form.  I have been unhappy with GHC's story for<br>
records for two decades.  (E.g. Lightweight extensible records for<br>
Haskell, Haskell Workshop, Paris 1999.)  But the design space is so<br>
complicated that we never found something that felt "obviously right".<br>
So we did nothing drastic, and I think that was right.<br>
<br>
But there was incremental progress, sketched here:<br>
<a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.haskell.org%2Fghc%2Fghc%2Fwikis%2Frecords%2Foverloaded-record-fields&data=02%7C01%7Csimonpj%40microsoft.com%7C2ec11b916c3c40b82aa908d7aec860aa%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637170047953667118&sdata=6pEL%2FH5MBhMuiu%2FmrhwwMqMh5x6af5owTypjc5lln2U%3D&reserved=0" target="_blank">https://gitlab.haskell.org/ghc/ghc/wikis/records/overloaded-record-fields</a><br>
<br>
* DuplicateRecordFields lets you have multiple records with the<br>
  same field name.<br>
* The HasField class lets us define overloaded record selection<br>
  and update functions.<br>
<br>
The proposal we are now discussing has no type-system component;<br>
it is *only* about syntactic sugar, allowing you to use dot-notation<br>
for field selection.<br>
<br>
Various extensions about syntax for update were discussed, but no<br>
longer form part of the proposal; what is left is the core, which<br>
has a particularly high benefit/cost ratio.<br>
<br>
Now, judgements may differ about the importance of syntactic sugar --<br>
that's why we have a committee with a diversity of views -- but I<br>
believe that dot-notation for record selection is super-important.<br>
I've wanted it for ages.  Every other language has it.  We have<br>
accepted other syntactic sugar with much lower utility.  And<br>
the dot is already a special case, via qualified names.<br>
<br>
I respect the fact that others may differ, but I really think<br>
think this is worth it.  It would be a crying shame to reject<br>
this.  Unlike Chris, I don't think anything better is going to<br>
emerge, however long we wait.<br>
<br>
I am more relaxed about 2/3/4.  Personally I hate (4) because<br>
I don't like *any* notation in which something binds more tightly<br>
than function application.  e.g. I cordially dislike (f K {x=3})<br>
meaning (f (K {x=3})).<br>
<br>
My preference is for (3), which allows record selection with<br>
spaces (which some argue for).  But (2) represents at most a lost<br>
opportunity, not a bad thing.<br>
<br>
Thanks<br>
<br>
Simon<br>
<br>
_______________________________________________<br>
ghc-steering-committee mailing list<br>
<a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
<a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-steering-committee&data=02%7C01%7Csimonpj%40microsoft.com%7C2ec11b916c3c40b82aa908d7aec860aa%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637170047953677114&sdata=RTbRved4sbRlFZMjrbXXh8%2FuRBJ5%2FubHzMzzOMc6kzw%3D&reserved=0" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>