<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=Windows-1252">
<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:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.Code, li.Code, div.Code
{mso-style-name:Code;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:9.0pt;
font-family:"Courier New";
mso-fareast-language:EN-US;}
span.EmailStyle18
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></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"><span style="font-size:12.0pt">OK, I think it’s time to commit my branch<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt"> wip/spj-wildcard-refactor<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt">Ben</span></b><span style="font-size:12.0pt">: could you commit it as a single large patch (ignore the branch history). A commit message appears below. There is a corresponding patch for haddock, with
same branch name in the haddock repo.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Could you also open a ticket for the performance regression on perf/compiler/T3064? I don’t want to forget it, but it’s past time to commit such a big, invasive patch.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">There are two other tests failing for me, which appear to do with the version number for the containers sub-module. I think I have failed to get the other submodules (other than haddock) right. I was NOT
intending to change them, so just use origin/master for them.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Everyone: take a look at the commit message below. I’ve been working on this for far too long, in spare moments. Richard, I’m sorry that it’ll be disruptive to your changes, but in a good way I hope.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="Code">This patch began as a modest refactoring of HsType and friends, to<o:p></o:p></p>
<p class="Code">clarify and tidy up exactly where quantification takes place in<o:p></o:p></p>
<p class="Code">types. Although initially driven by making the implementation of<o:p></o:p></p>
<p class="Code">wildcards more tidy (and fixing a number of bugs), I gradually got<o:p></o:p></p>
<p class="Code">drawn into a pretty big process, which I've been doing on and off for<o:p></o:p></p>
<p class="Code">quite a long time.<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">There is one compiler performance regression as a result of all<o:p></o:p></p>
<p class="Code">this, in perf/compiler/T3064. I still need to look into that.<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">* The principal driving change is described in Note [HsType binders]<o:p></o:p></p>
<p class="Code"> in HsType. Well worth reading!<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">* Those data type changes drive almost<o:p></o:p></p>
<p class="Code"> everything else. In particular we now statically know where<o:p></o:p></p>
<p class="Code"> (a) implicit quantification only (LHsSigType),<o:p></o:p></p>
<p class="Code"> e.g. in instance declaratios and SPECIALISE signatures<o:p></o:p></p>
<p class="Code"> (b) implicit quantification and wildcards (LHsSigWcType)<o:p></o:p></p>
<p class="Code"> can appear, e.g. in function type signatures<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">* As part of this change, HsForAllTy is (a) simplified (no wildcards)<o:p></o:p></p>
<p class="Code"> and (b) split into HsForAllTy and HsQualTy. The two contructors<o:p></o:p></p>
<p class="Code"> appear when and only when the correponding user-level construct<o:p></o:p></p>
<p class="Code"> appears. Again see Note [HsType binders].<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code"> HsExplicitFlag disappears altogether.<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">* Other simplifications<o:p></o:p></p>
<p class="Code"> - ExprWithTySig no longer needs an ExprWithTySigOut variant<o:p></o:p></p>
<p class="Code"> - TypeSig no longer needs a PostRn name [name] field<o:p></o:p></p>
<p class="Code"> for wildcards<o:p></o:p></p>
<p class="Code"> - PatSynSig records a LHsSigType rather than the decomposed pieces<o:p></o:p></p>
<p class="Code"> - The mysterious 'GenericSig' is now 'ClassOpSig'<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">* Renamed LHsTyVarBndrs to LHsQTyVars<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">* There are some uninteresting knock-on changes in Haddock,<o:p></o:p></p>
<p class="Code"> because of the HsSyn changes<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">I also did a bunch of loosely-related changes:<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">* We already had type synonyms CoercionN/CoercionR for nominal and<o:p></o:p></p>
<p class="Code"> representational coercions. I've added similar treatment for<o:p></o:p></p>
<p class="Code"> TcCoercionN/TcCoercionR<o:p></o:p></p>
<p class="Code"> mkWpCastN/mkWpCastN<o:p></o:p></p>
<p class="Code"> All just type synonyms but jolly useful.<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">* I record-ised ForeignImport and ForeignExport<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">* I improved the (poor) fix to Trac #10896, by making<o:p></o:p></p>
<p class="Code"> TcTyClsDecls.checkValidTyCl recover from errors, but adding a<o:p></o:p></p>
<p class="Code"> harmless, abstract TyCon to the envt if so.<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code">* I did some significant refactoring in RnEnv.lookupSubBndrOcc,<o:p></o:p></p>
<p class="Code"> for reasons that I have (embarrassingly) now totally forgotten.<o:p></o:p></p>
<p class="Code"> It had to do with something to do with import and export<o:p></o:p></p>
<p class="Code"><o:p> </o:p></p>
<p class="Code"><o:p> </o:p></p>
</div>
</body>
</html>