<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:"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:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        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:12.0pt;
        font-family:"Times New Roman",serif;}
p.Code, li.Code, div.Code
        {mso-style-name:Code;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:11.35pt;
        margin-bottom:.0001pt;
        font-size:9.0pt;
        font-family:"Courier New";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.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:223444962;
        mso-list-type:hybrid;
        mso-list-template-ids:-1893948396 134807567 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:791442239;
        mso-list-template-ids:-1454232048;}
@list l2
        {mso-list-id:1023484491;
        mso-list-template-ids:-1454232048;}
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">
<ol start="1" type="1">
<li class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;mso-list:l2 level1 lfo1">
Shall I assume that we will be part of GHC 8.0? Dropping the literals from the pattern<br>
syntax is not an option at the moment since I am as swamped as ever. Nevertheless<br>
I can sprint for about a week and wrap what we have up which works OK.<o:p></o:p></li></ol>
<p class="MsoNormal">Yes: provided it all validates, just commit it.  It’s already a substantial improvement over what we have right now.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’d still like to understand why putting literals in guards rather than in patterns makes performance worse.  But that should not stand in the way of getting it in.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Still I hope you won’t drop the investigation altogether.  I suspect that making literals-in-guards work acceptably well will improve performance all round. 
<o:p></o:p></p>
<ol start="2" type="1">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l2 level1 lfo1">
Ben asked the developers to put the patches on the phabricator but you have told me<br>
that there is no need since you have reviewed the code yourself. Shall I assume this<br>
still holds?<o:p></o:p></li></ol>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Yes I think so.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Simon<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></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"> George Karachalias [mailto:george.karachalias@gmail.com]
<br>
<b>Sent:</b> 18 November 2015 19:49<br>
<b>To:</b> Simon Peyton Jones <simonpj@microsoft.com><br>
<b>Cc:</b> Tom Schrijvers <tom.schrijvers@cs.kuleuven.be>; Dimitrios Vytiniotis <dimitris@microsoft.com><br>
<b>Subject:</b> About Feature status for GHC 8.0<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm">
Hello Simon,<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
I got the mail from Ben Gamari about the state of our patch (since GHC 8.0 release is<br>
approaching) and I would like to respond to Ben tomorrow about it.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<br>
<b><u>Current State</u></b><br>
<br>
As you have probably noticed, I reverted back to the last commit (just revert, I did not rewrite<br>
history) that was able to bootstrap the compiler. This means that literals are currently in the<br>
pattern syntax. I could not find why moving literals to the solver generated so many problems.<br>
The only thing that I didn't have the time to address yet is warnings for data families but the<br>
deadline is close so I will look into that.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm">
<br>
<b><u>Performance of current implementation</u></b><br>
<br>
When I started the implementation, I branched on this commit (it was the HEAD at the time):<o:p></o:p></p>
<div style="margin-left:30.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<a href="https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgit.haskell.org%2fghc.git%2fcommit%2fb14dae3cc43572a9dd5ca11241981105e4281aac&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7cc7a8decdcb624567aec908d2f0514579%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=WbpEsxtJAS0VJ7AWn44MxqxbFv6b4hQGOv4HJ2snfBM%3d" target="_blank">https://git.haskell.org/ghc.git/commit/b14dae3cc43572a9dd5ca11241981105e4281aac</a><br clear="all">
<o:p></o:p></p>
</div>
<div>
<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">
For some time now I was under the impression that our checker consumes a lot of memory<br>
because we had many perf-failures from the test suit. Yet, I ran the test suite with the above<br>
version of GHC. The performance tests from the test suite that fail for our implementation fail<br>
for that as well. Hence, I do not think that it is our problem exactly, I expect GHC's current<br>
HEAD to perform OK, and when merging I do not expect any performance problems from our<br>
checker (the only performance test we fail is testsuite/tests/perf/compiler/T5642.hs which has<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">
pattern matching on ~100 constructors and also nested pattern matching so I think that it<br>
makes a lot of sense to consume more memory on this one).<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:12.0pt;margin-left:0cm">
More importantly, what should my response to Ben be? Many users are expecting the new<br>
checker so I would like to merge what we have when I finish the data families handling. I would<br>
like to drop the literals from patterns but for now I think that having the improved checker in<br>
GHC 8.0 is more important. We can always make it more generic in the future.<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">
To wrap things up:<o:p></o:p></p>
<ol start="1" type="1">
<li class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;mso-list:l1 level1 lfo2">
Shall I assume that we will be part of GHC 8.0? Dropping the literals from the pattern<br>
syntax is not an option at the moment since I am as swamped as ever. Nevertheless<br>
I can sprint for about a week and wrap what we have up which works OK.<o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo2">
Ben asked the developers to put the patches on the phabricator but you have told me<br>
that there is no need since you have reviewed the code yourself. Shall I assume this<br>
still holds?<o:p></o:p></li></ol>
<p class="MsoNormal">George<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#660000">things you own end up owning you</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>