<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.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";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        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.EmailStyle19
        {mso-style-type:personal-reply;
        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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">The commit is a one-line change to IEThingAll, which says:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">        -- See Note [Located RdrNames] in HsExpr<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">But HsExpr does not contain such a Note.  Did you omit something?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;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"> Alan & Kim Zimmerman [mailto:alan.zimm@gmail.com]
<br>
<b>Sent:</b> 23 November 2015 13:40<br>
<b>To:</b> Simon Peyton Jones <simonpj@microsoft.com><br>
<b>Subject:</b> Re: [GHC] #11019: ApiAnnotations: Make all RdrName occurences Located<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Done, see <a href="https://phabricator.haskell.org/rGHC7c9a04d6eda5495f150a1140e6d26fc64e319b7e">
https://phabricator.haskell.org/rGHC7c9a04d6eda5495f150a1140e6d26fc64e319b7e</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Mon, Nov 23, 2015 at 12:13 PM, Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Alan<br>
<br>
| ApiAnnotations: Make all RdrName occurences Located<br>
<br>
There is a principle here: that every RdrName occurrence is located.  Is this principle articulated in a Note anywhere?  I wish it was!  (Including an explanation of why.) Otherwise you risk someone removing the change in a few years time.<br>
<br>
When I built HsSyn originally I reasoned that<br>
<br>
  data HsExpr = ...| HsVar RdrName<br>
was better than<br>
  data HsExpr = ... | HsVar (Located RdrName0<br>
<br>
because the location on the RdrName is identical to that on the LHsExpr, so it's redundant.  But you think it is non-redundant.  I'm sure you are right (although I don't know why), but it would be a real help to document the invariant and the reasoning in the
 code somewhere.<br>
<br>
Are there any other principles that the code embodies?<br>
<br>
Thanks<br>
<br>
Simon<br>
<br>
|  -----Original Message-----<br>
|  From: ghc-tickets [mailto:<a href="mailto:ghc-tickets-bounces@haskell.org">ghc-tickets-bounces@haskell.org</a>] On Behalf<br>
|  Of GHC<br>
|  Sent: 22 November 2015 23:11<br>
|  Cc: <a href="mailto:ghc-tickets@haskell.org">ghc-tickets@haskell.org</a><br>
|  Subject: Re: [GHC] #11019: ApiAnnotations: Make all RdrName occurences<br>
|  Located<br>
|<br>
|  #11019: ApiAnnotations: Make all RdrName occurences Located<br>
|  -------------------------------------+--------------------------------<br>
|  --<br>
|  -------------------------------------+---<br>
|          Reporter:  alanz             |                Owner:  alanz<br>
|              Type:  bug               |               Status:  new<br>
|          Priority:  normal            |            Milestone:  8.0.1<br>
|         Component:  Compiler          |              Version:  7.10.2<br>
|        Resolution:                    |             Keywords:<br>
|                                       |  ApiAnnotations<br>
|  Operating System:  Unknown/Multiple  |         Architecture:<br>
|                                       |  Unknown/Multiple<br>
|   Type of failure:  None/Unknown      |            Test Case:<br>
|        Blocked By:                    |             Blocking:<br>
|   Related Tickets:                    |  Differential Rev(s):<br>
|  Phab:1512<br>
|         Wiki Page:                    |<br>
|  -------------------------------------+--------------------------------<br>
|  --<br>
|  -------------------------------------+---<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">|<br>
|  Comment (by Ben Gamari <ben@…>):<br>
|<br>
|   In [changeset:"3df9563e590bbfbfe1bc9171a0e8fc93ceef690d/ghc"<br>
|   3df9563e/ghc]:<br>
|   {{{<br>
|   #!CommitTicketReference repository="ghc"<br>
|   revision="3df9563e590bbfbfe1bc9171a0e8fc93ceef690d"<br>
|   ApiAnnotations: Make all RdrName occurences Located<br>
|<br>
|   At the moment the API Annotations can only be used on the<br>
|  ParsedSource,  as there are changes made to the RenamedSource that<br>
|  prevent it from  being used to round trip source code.<br>
|<br>
|   It is possible to build a map from every Located Name in the<br>
|  RenamedSource from its location to the Name, which can then be used<br>
|  when  resolved names are required when changing the ParsedSource.<br>
|<br>
|   However, there are instances where the identifier is not located,<br>
|  specifically<br>
|<br>
|     (GHC.VarPat name)<br>
|     (GHC.HsVar name)<br>
|     (GHC.UserTyVar name)<br>
|     (GHC.HsTyVar name)<br>
|<br>
|   Replace each of the name types above with (Located name)<br>
|<br>
|   Updates the haddock submodule.<br>
|<br>
|   Test Plan: ./validate<br>
|<br>
|   Reviewers: austin, goldfire, bgamari<br>
|<br>
|   Reviewed By: bgamari<br>
|<br>
|   Subscribers: goldfire, thomie, mpickering<br>
|<br>
|   Differential Revision: <a href="https://phabricator.haskell.org/D1512" target="_blank">
https://phabricator.haskell.org/D1512</a><br>
|<br>
|   GHC Trac Issues: #11019<br>
|   }}}<br>
|<br>
|  --<br>
|  Ticket URL:<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">|  <<a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fghc.h" target="_blank">https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fghc.h</a><br>
|  <a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2faskell.org&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7c132a7ad8a5d94d6364d608d2f40badf2%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=8LAYjhdWrzeCWyXOw%2bHWE4pNOdtWyN1vialpOAibZ0k%3d" target="_blank">
askell.org</a>%2ftrac%2fghc%2fticket%2f11019%23comment%3a5&data=01%7c01%7c<br>
|  simonpj%<a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2f40064d.mgd.microsoft.com&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7c132a7ad8a5d94d6364d608d2f40badf2%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=o7LJAE9yQyC%2buXGzNDXO6JTke5DWSkyFlICw%2fKYMVsQ%3d" target="_blank">40064d.mgd.microsoft.com</a>%7cd486e47f742f47e34e7308d2f39230b0%7c<br>
|  72f988bf86f141af91ab2d7cd011db47%7c1&sdata=AmQZ%2boKbdHXQ4cuPjYOVePqF7<br>
|  ivXocZyqHXbcyBj3GY%3d><br>
|  GHC<br>
|  <<a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.h" target="_blank">https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.h</a><br>
|  <a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2faskell.org&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7c132a7ad8a5d94d6364d608d2f40badf2%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=8LAYjhdWrzeCWyXOw%2bHWE4pNOdtWyN1vialpOAibZ0k%3d" target="_blank">
askell.org</a>%2fghc%2f&data=01%7c01%7csimonpj%<a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2f40064d.mgd.microsoft.com&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7c132a7ad8a5d94d6364d608d2f40badf2%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=o7LJAE9yQyC%2buXGzNDXO6JTke5DWSkyFlICw%2fKYMVsQ%3d" target="_blank">40064d.mgd.microsoft.com</a>%7c<br>
|  d486e47f742f47e34e7308d2f39230b0%7c72f988bf86f141af91ab2d7cd011db47%7c<br>
|  1&sdata=Ca9k88QpvsPGDgrkQCANdKLAPCnAKwoZdHzbIhBgnIU%3d><br>
|  The Glasgow Haskell Compiler<br>
|  _______________________________________________<br>
|  ghc-tickets mailing list<br>
|  <a href="mailto:ghc-tickets@haskell.org">ghc-tickets@haskell.org</a><br>
|  <a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fmail.h" target="_blank">
https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fmail.h</a><br>
|  <a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2faskell.org&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7c132a7ad8a5d94d6364d608d2f40badf2%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=8LAYjhdWrzeCWyXOw%2bHWE4pNOdtWyN1vialpOAibZ0k%3d" target="_blank">
askell.org</a>%2fcgi-bin%2fmailman%2flistinfo%2fghc-<br>
|  tickets%0a&data=01%7c01%7csimonpj%<a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2f40064d.mgd.microsoft.com&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7c132a7ad8a5d94d6364d608d2f40badf2%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=o7LJAE9yQyC%2buXGzNDXO6JTke5DWSkyFlICw%2fKYMVsQ%3d" target="_blank">40064d.mgd.microsoft.com</a>%7cd486e47f7<br>
|  42f47e34e7308d2f39230b0%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=Q<br>
|  aS%2fcmZrioGbpGHXUFNcdCmhyFt6mnV4DH4ucOsO7eo%3d<o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>