<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:"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-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;}
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;
        mso-style-link:"Code Char";
        margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:36.0pt;
        font-size:12.0pt;
        font-family:"Courier New";
        mso-fareast-language:EN-US;}
span.CodeChar
        {mso-style-name:"Code Char";
        mso-style-link:Code;
        font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal-compose;
        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;}
--></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">Iavor, Richard, and others<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">We always thought it was the Right Thing to generate the runtime representation for a TyCon (used in Typeable type representations) at the definition site of the type, not “on the fly”.  I thought I’d do this.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">But it was a LOT harder than I expected.  I have spent a ridiculous amount of time on it over the last three weeks.  Sigh.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">However (a) it’s done, (b) I did a lot of other tidying up (as usual).  So I’m keen to use it.  
<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt">Would you like to take a look?</span></b><span style="font-size:12.0pt">  It’s on branch wip/T9858-typeable-spj.  Relevant log messages below.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Unsurprisingly, some perf/compiler tests get a bit slower (see below). 
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">More surprisingly, there are two perf/should_run tests that get worse<o:p></o:p></span></p>
<p class="Code">   perf/should_run  T5205 [stat not good enough] (normal)<o:p></o:p></p>
<p class="Code">   perf/should_run  lazy-bs-alloc [stat not good enough] (normal)<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">This is much more surprising: neither seems to have anything much to do with Typeable.  But I can’t investigate before I go on holiday. Would anyone else like to?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">It’s all up to date wrt HEAD.<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" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
commit fcd18c42b6ae2e73a9f4c67dbe6d994b0f8468c8<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Author: Simon Peyton Jones <simonpj@microsoft.com><o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Date:   Thu Mar 26 11:06:12 2015 +0000<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    Remove a redndant 'return'<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
commit a6200759fd2f3f0e901cb2092e148bf31abb08b4<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Author: Simon Peyton Jones <simonpj@microsoft.com><o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Date:   Mon Mar 23 14:53:53 2015 +0000<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    Error message wibbles<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    These are associated with<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
     - new instance reporting<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
     - typeable changes in -ddump-simpl output<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
     - -ddump-types being a bit less verbose<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
     - some renaming of type variables in debugger output (no idea why this happens)<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
commit fe510d911b6cf61d6884b8b42d8771d4aea3229f<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Author: Simon Peyton Jones <simonpj@microsoft.com><o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Date:   Mon Mar 23 14:50:23 2015 +0000<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    Generate Typeble info at definition sites<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    This patch implements the idea floated in #9858, namely that we should<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    generate type-representation information at the data type declaration<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    site, rather than when solving a Typeable constraint.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    However, this turned out quite a bit harder than I expected.  I still<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    think it's the right thing to do, and it's done now, but it was quite<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    a struggle.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    See particularly<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      * Note [Grand plan for Typeable] in TcTypeable (which is a new module)<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      * Note [The overall promotion story] in DataCon (clarifies existing stuff)<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    The most painful bit was that to generate Typeable instances (ie TyConRepName<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    bindings) for every TyCon is tricky for types in ghc-prim etc:<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      - we need to have enough data types around to *define* a TyCon<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      - many of these types are wired-in<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    Also, to minimise the code generated for each data type, I wanted to generate<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    pure data, not CAFs with unpackCString# stuff floating about.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    Performance<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    ~~~~~~~~~~~<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    Three perf/compiler tests start to allocate quite a bit more. This isn't surprising,<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    because they all allocate zillions of data types, with practically no other code,<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    esp T1969<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
       T1969:  GHC allocates 30% more<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
       T5642:  GHC allocates 14% more<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
       T9872d: GHC allocates  5% more<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    I'm treating this as acceptable.  The payoff comes in Typeable-heavy code.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    Remaining to do<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    ~~~~~~~~~~~~~~~<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * I think that "TyCon" and "Module" are over-generic names to use for<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      the runtime type representations used in GHC.Typeable.  Better might<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      be "TrTyCon" and "TrModule".  But I have not yet done this<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * Add more info the the "TyCon" e.g. source location where it was defined<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * Use the new "Module" type to help with Trac #10068<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * It would be possible to generate TyConRepName (ie Typeable instances)<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      selectively rather than all the time.  We'd need to persist the information<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      in interface files.  Lacking a motivating reason I have not done this, but<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      it would not be difficult.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    Refactoring<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    ~~~~~~~~~~~<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    As is so often the case, I ended up refactoring more than I intended.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    In particular<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * In TyCon,<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
          - a type *family* (whether type or data)<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
            is repesented by a FamilyTyCon<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
          - a algebraic data type (including data/newtype instances)<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
            is represented by AlgTyCon<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      This wasn't true before; a data family was represented as<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      an AlgTyCon.  There are some corresponding changes in IfaceSyn.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      Also get rid of the (unhelpfully named) tyConParent.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * In TyCon define 'Promoted', isomorphic to Maybe, used when things<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      are optionally promoted; and use it elsewhere in GHC.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * Each TyCon, including promoted TyCons, contains its TyConRepName,<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      if it has one.  This is, in effect, the name of its Typeable<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      instance.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * I added PatSynId, DefMethId, and ReflectionId to the IdInfo.IdDetails<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      type.  They are used for debugging only, namely to suppress excessive<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
      output in -ddump-types.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * Tidy up the generation of PrelInfo.knownKeyNames<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * Move newImplicitBinder from IfaceEnv to BuildTyCl<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * PrelNames.conName renamed to dcQual for consistency with varQual, tcQual<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    * Move mkDefaultMethodIds, mkRecSelBinds from TcTyClsDecls to TcTyDecls<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
commit 021e6f583a1159b0a3581ab1713d560cadc2bdf7<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Author: Simon Peyton Jones <simonpj@microsoft.com><o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Date:   Mon Mar 23 14:32:31 2015 +0000<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    tcRnDeclsi can use tcRnSrcDecls<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    I'm not sure why tcRnDeclsi didn't call tcRnSrcDecls before, but now it<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    does.  About 20 lines of code vanish. Hooray.<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
commit 6473d110ab1aa22a5933e405b59e3f597562ce02<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Author: Simon Peyton Jones <simonpj@microsoft.com><o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Date:   Fri Mar 20 12:38:42 2015 +0000<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    Implement lookupGlobal in TcEnv, and use it<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    This localises the (revolting) initTcForLookup function, exposing<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    instead the more civilised interface for lookupGlobal<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
commit 7078a11f50e3af9139dd5ceef032e89047677833<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Author: Simon Peyton Jones <simonpj@microsoft.com><o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Date:   Fri Mar 20 12:36:22 2015 +0000<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
   Comments and white space<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
commit 48512df5751a07fd503f0ba523e5504d09ee258d<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Author: Simon Peyton Jones <simonpj@microsoft.com><o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
Date:   Fri Mar 20 12:27:59 2015 +0000<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
<o:p> </o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    Improve the error messages for class instance errors<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    <o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
    See Note [Displaying potential instances].<o:p></o:p></p>
<p class="Code" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt">
simonpj@cam-05-unx:~/code/HEAD-5$<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
</body>
</html>