<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;}
h1
{mso-style-priority:9;
mso-style-link:"Heading 1 Char";
margin-top:12.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:16.0pt;
font-family:"Calibri Light",sans-serif;
color:#2F5496;
mso-fareast-language:EN-US;
font-weight:normal;}
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;}
span.EmailStyle18
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.Heading1Char
{mso-style-name:"Heading 1 Char";
mso-style-priority:9;
mso-style-link:"Heading 1";
font-family:"Calibri Light",sans-serif;
color:#2F5496;}
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;}
.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:1599752917;
mso-list-type:hybrid;
mso-list-template-ids:1712774336 1171841264 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
{mso-level-start-at:0;
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;
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
@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:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;
mso-bidi-font-family:Wingdings;}
@list l0: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;
mso-bidi-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:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;
mso-bidi-font-family:Wingdings;}
@list l0: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;
mso-bidi-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:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;
mso-bidi-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">Colleagues<o:p></o:p></p>
<p class="MsoNormal">Now that we have agreed a set of alternatives on using dot notation for records, let's vote. We all recognise and respect that syntactic choices are a judgement call, and that reasonable people may diff in their judgements. But we need
to come to as resolution and voting is a good way to do that.<o:p></o:p></p>
<p class="MsoNormal"><b>Please put your votes on the Google doc.</b> I've make a section for that at the end.
<a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.google.com%2Fdocument%2Fd%2F1MgovHRUUNjbuM4nM8qEe308MfbAYRh2Q8PxFHl7iY74%2Fedit%3Fusp%3Dsharing&data=02%7C01%7Csimonpj%40microsoft.com%7Ca528b11e503e43cc660308d7cbe97ac1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637202075954123160&sdata=8Wd6L7caSByus%2F8zwmLq6vbRqbifNCjkbYuWaSER0Aw%3D&reserved=0">
The document is here</a>.<o:p></o:p></p>
<p class="MsoNormal">Just write down your preferences, in order, preferred ones first.
<o:p></o:p></p>
<p class="MsoNormal">Joachim runs an election algorithm that makes it worth specifying a total order on all options,
<b>including ones you don't like</b>. For any you omit, you are saying "if these ones are the top contenders I have no preference between them". You can specify ties, again meaning "no preference between these". For the over-interested, the algorithm is
<a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCondorcet_method&data=02%7C01%7Csimonpj%40microsoft.com%7Ca528b11e503e43cc660308d7cbe97ac1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637202075954133147&sdata=9HmtR634TMUXHozP81lnvMR0SvYIXlBtfRTiDyUkWq8%3D&reserved=0">
Condorcet</a>; in the unlikely case that it does not produce a winner, we revert to
<a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FSchulze_method&data=02%7C01%7Csimonpj%40microsoft.com%7Ca528b11e503e43cc660308d7cbe97ac1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637202075954133147&sdata=GIzAX0Wvw1lWtUfUGvv3VmdLGLEFX7o8asdeuVbu6U8%3D&reserved=0">
Schultze</a><o:p></o:p></p>
<p class="MsoNormal">Please read the document, including the Notes, carefully! We have ended up with a lot of variations, and their numbering is historical not logical. (I considered renumbering but thought that would be more confusing than helpful.)<o:p></o:p></p>
<p class="MsoNormal">As the shepherd I am supposed to make a recommendation; it is below.<o:p></o:p></p>
<p class="MsoNormal">Simon<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<h1>Shepherd's recommendations<o:p></o:p></h1>
<p class="MsoNormal">Here is my recommendation:<o:p></o:p></p>
<p class="MsoNormal"><b> C6 > C2b > C3 > C2a > C7 > C4 > C5 > C1<o:p></o:p></b></p>
<h2>I recommend acceptance<o:p></o:p></h2>
<p class="MsoNormal">Overall, I strongly urge that we accept the proposal in some form; that is, we should not do (C1). I have been unhappy with GHC's story for records for two decades. (E.g. Lightweight extensible records for Haskell, Haskell Workshop, Paris
1999.) But the design space is so complicated that we never found something that felt "obviously right". So we did nothing drastic, and I think that was right.<o:p></o:p></p>
<p class="MsoNormal">But there was incremental progress, <a href="%5d(https:/gitlab.haskell.org/ghc/ghc/wikis/records/overloaded-record-fields">
sketched here</a>:<o:p></o:p></p>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">DuplicateRecordFields lets you have multiple records with the same field name.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">The HasField class lets us define overloaded record selection and update functions.<o:p></o:p></li></ul>
<p class="MsoNormal">The proposal we are now discussing has no type-system component; it is
<b>only</b> about syntactic sugar, allowing you to use dot-notation for field selection. (Various extensions about syntax for update were discussed, but no longer form part of the proposal; what is left is the core.)<o:p></o:p></p>
<p class="MsoNormal">I really think this change has vastly higher impact and utility than many other accepted proposals. I know that some members of the committee differ from this view; that's fair enough.<o:p></o:p></p>
<h2>Alternatives I like:<o:p></o:p></h2>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">I urge us to adopt (C6). I really really want
<b><span style="font-family:"Courier New"">(f M.N.x) </span></b>to parse the same as
<b><span style="font-family:"Courier New"">(f M.n.x)</span></b><b>,</b> where the only difference is the capitalisation of the second-last element of
<b><span style="font-family:"Courier New"">M.n.x</span></b>. <o:p></o:p></li></ul>
<p class="MsoListParagraph"><b><i>I'm leaning strongly on the connection with qualified names</i></b>. We already have qualified names, and they are incredibly useful. Qualified names already treat “.” specially. Moreover the proposal uses “.” in precisely
the same way as qualified names: a qualified name M.x allows you to pick x from the module M; this proposal allows r.x to pick a field x from a value r. I like this uniformity of both concept and syntax.<o:p></o:p></p>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">(C2b) is a weakened form of (C6) that does not allow naked selectors, thus
<b><span style="font-family:"Courier New"">(f .x)</span></b><b> </b>where there is a space before the ".". I don't see any difficulty with the postfix operator story, so I prefer (C6). But (C2b) is a little more conservative.<o:p></o:p></li></ul>
<h2>Alternatives I actively dislike:<o:p></o:p></h2>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">I urge against (C1) as I say above.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">I dislike (C5) strongly, because it makes
<b><span style="font-family:"Courier New"">(f M.N.x)</span></b> parse completely differently from
<b><span style="font-family:"Courier New"">(f M.n.x).</span></b> The authors of the proposal say that they would withdraw the proposal outright (or at least disassociate themselves) if we adopted (C5).<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">I dislike (C7) for the same reason:
<b><span style="font-family:"Courier New"">(f M.N.x)</span></b> is legal but <b><span style="font-family:"Courier New"">(f M.n.x)</span></b> is not.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">I dislike (C4) because nothing should bind more tightly than function application. I hate that
<b><span style="font-family:"Courier New"">(f r .x s .y</span></b>) would mean <b>
<span style="font-family:"Courier New"">(f (r.x) (s.y)).</span></b> Yes, we already have that
<b><span style="font-family:"Courier New"">(f r {x=2})</span></b> means <b><span style="font-family:"Courier New"">(f (r {x=2}))</span></b><span style="font-family:"Courier New"">,</span> but I think that's terrible, and we should not perpetuate it.<o:p></o:p></li></ul>
<h2>Alternatives in the middle<o:p></o:p></h2>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">(C2a) and (C3) are just like (C2b) and (C6), but additionally allow a tightly-binding record selection after a parenthesised expression. Thus
<b><span style="font-family:"Courier New"">(f (g x).y)</span></b> means <b><span style="font-family:"Courier New"">(f ((g x).y)).</span></b><o:p></o:p></li></ul>
<p class="MsoListParagraph">Allowing this is a bit tricky to specify, and the link to qualified names is much weaker. I don't think it pays its way.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>