<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 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 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
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</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=Section1>

<p class=MsoNormal style='margin-bottom:12.0pt'>Thanks, this makes sense and
helps. &nbsp; Is this described in the wobbly types paper, or is paper covering
a different topics?&nbsp; I would like to have a cite-able reference.<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Excellent question.&nbsp;&nbsp; I believe that what I describe below is a <b>restriction</b>
of the system described in the POPL&#8217;06 paper<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
href="http://research.microsoft.com/%7Esimonpj/papers/gadt/gadt-icfp.pdf">http://research.microsoft.com/%7Esimonpj/papers/gadt/gadt-icfp.pdf</a><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>At this moment I can&#8217;t remember when we changed to the
additional restrictions below.&nbsp; I think the reason was that we wanted to avoid
the complexity of &#8220;fresh&#8221; mgus described in the paper, but memory is failing
me.&nbsp; Dimitrios or Stephanie may have a better memory.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Simon<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</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 #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> glasgow-haskell-users-bounces@haskell.org
[mailto:glasgow-haskell-users-bounces@haskell.org] <b>On Behalf Of </b>Jason
Dagit<br>
<b>Sent:</b> 29 July 2008 15:14<br>
<b>To:</b> Simon Peyton-Jones<br>
<b>Cc:</b> glasgow-haskell-users@haskell.org<br>
<b>Subject:</b> Re: GHC 6.6 GADT type unification vs GHC 6.8<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p>

<div>

<p class=MsoNormal>On Tue, Jul 29, 2008 at 1:07 AM, Simon Peyton-Jones &lt;<a
href="mailto:simonpj@microsoft.com">simonpj@microsoft.com</a>&gt; wrote:<o:p></o:p></p>

<div>

<div>

<p><span style='font-size:11.0pt;color:#1F497D'>GHC 6.6 was a bit more generous
than GHC 6.8, but erroneously so. &nbsp;&nbsp;Specifically, GHC 6.8 and all
subsequent versions require that when you pattern match on a value of GADT
type,</span><o:p></o:p></p>

<p style='margin-left:72.0pt;text-indent:-18.0pt'><span style='font-size:11.0pt;
font-family:Symbol;color:#1F497D'>&middot;</span><span style='font-size:11.0pt;
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
style='font-size:11.0pt;font-family:Symbol;color:#1F497D'> </span><span
style='font-size:11.0pt;color:#1F497D'>the type of the scrutinee</span><o:p></o:p></p>

<p style='margin-left:72.0pt;text-indent:-18.0pt'><span style='font-size:11.0pt;
font-family:Symbol;color:#1F497D'>&middot;</span><span style='font-size:11.0pt;
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
style='font-size:11.0pt;font-family:Symbol;color:#1F497D'> </span><span
style='font-size:11.0pt;color:#1F497D'>the type of the result of the case</span><o:p></o:p></p>

<p style='margin-left:72.0pt;text-indent:-18.0pt'><span style='font-size:11.0pt;
font-family:Symbol;color:#1F497D'>&middot;</span><span style='font-size:11.0pt;
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
style='font-size:11.0pt;font-family:Symbol;color:#1F497D'> </span><span
style='font-size:11.0pt;color:#1F497D'>the types of any free variables used
inside the case alternatives</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>are all completely known
(&quot;rigid&quot; in GHC's terminology) at the case expression.</span><o:p></o:p></p>

</div>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'>Thanks, this makes sense and
helps. &nbsp; Is this described in the wobbly types paper, or is paper covering
a different topics?&nbsp; I would like to have a cite-able reference.<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'>

<div>

<div>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>The easiest way to make a
variable have a rigid type is to give it a type signature.&nbsp; </span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>I don't expect to revert to GHC
6.6's behaviour because I don't know how to do (robust, complete) type
inference for that.</span><o:p></o:p></p>

</div>

</div>

</blockquote>

<div>

<p class=MsoNormal><br>
In that case, good thing I finally figured out what changes to make to darcs so
that our type witness code compiles in both 6.6 and 6.8.&nbsp; My changes match
what you describe.<br>
&nbsp;<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'>

<div>

<div>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>I'll add these remarks to the
user manual.</span><o:p></o:p></p>

</div>

</div>

</blockquote>

<div>

<p class=MsoNormal>Great!<br>
&nbsp;<br>
Thanks,<br>
Jason<o:p></o:p></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</div>

</div>

</body>

</html>