<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:19.85pt;
        margin-bottom:.0001pt;
        font-size:10.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;}
.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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Great.  No rush.  Yell if you need help.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;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"> Richard Fung [mailto:minesasecret@gmail.com]
<br>
<b>Sent:</b> 24 June 2016 19:05<br>
<b>To:</b> Simon Peyton Jones <simonpj@microsoft.com><br>
<b>Cc:</b> ghc-devs@haskell.org<br>
<b>Subject:</b> Re: Help on first ticket<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><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">
Hi Simon, I am making progress but slowly (I only have time to work on this outside of work unfortunately).<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">
<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">
If this needs to be done soon feel free to reassign it to someone else! Otherwise, while at times I feel like I'm over my head I would like to keep at it.<o:p></o:p></p>
</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>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
On Fri, Jun 24, 2016 at 4:20 AM, 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" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
Richard, did you get on ok?<br>
<br>
Simon<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">
<br>
|  -----Original Message-----<br>
|  From: ghc-devs [mailto:<a href="mailto:ghc-devs-bounces@haskell.org">ghc-devs-bounces@haskell.org</a>] On Behalf Of Ben<br>
|  Gamari<br>
|  Sent: 04 June 2016 23:20<br>
|  To: Richard Fung <<a href="mailto:minesasecret@gmail.com">minesasecret@gmail.com</a>>;
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
|  Subject: Re: Help on first ticket<br>
|<br>
|  Richard Fung <<a href="mailto:minesasecret@gmail.com">minesasecret@gmail.com</a>> writes:<br>
|<br>
|  > Hello! I apologize if this isn't the right place to ask; if it isn't<br>
|  > please steer me in the right direction.<br>
|  ><br>
|  Hi Richard!<br>
|<br>
|  > Would anyone be willing to advise me on my first ticket? I've been<br>
|  > trying to work on it on and off but haven't made much progress on my<br>
|  own.<br>
|  ><br>
|  > It's ticket #9370: <a href="https://ghc.haskell.org/trac/ghc/ticket/9370" target="_blank">
https://ghc.haskell.org/trac/ghc/ticket/9370</a><br>
|  ><br>
|  Great, I'm happy to hear that someone has picked this one up. I think<br>
|  it is a nice choice for a self-contained newcomers project.<br>
|<br>
|  > I think I understand the issue conceptually but I don't know where<br>
|  to<br>
|  > look for the code that needs to be changed..<br>
|  ><br>
|  I don't know where the code responsible for this is off the top of my<br>
|  head, however I can provide some pointers.<br>
|<br>
|  So the unfoldings you are looking to preserve come from interface<br>
|  files.<br>
|  The machinery for all of this is in compiler/iface. IfaceSyn.hs is of<br>
|  particular interest and there you will find the definition of<br>
|  IfaceUnfolding, which is the unfolding representation which is stored<br>
|  in the interface file. Unfoldings live inside of IdInfo values, which<br>
|  hold various miscellaneous information which we need to preserve about<br>
|  a particular Id (identifier).<br>
|<br>
|  There is a somewhat useful comment regarding how IdInfo is treated<br>
|  above the definition of IfaceIdInfo in IfaceSyn. In particular it<br>
|  seems that interface files for modules compiled with -O0 will have<br>
|  their IdInfo fields set to NoInfo. It's not clear what happens when an<br>
|  interface file is read. However, grepping for NoInfo reveals a use-<br>
|  site in TcIface.tcIdInfo which looks interesting (in particular the<br>
|  ignore_prags guard). I think this should be enough to get you going on<br>
|  the interface file part of this.<br>
|<br>
|  The other part of this ticket is deciding whether to use an unfolding<br>
|  when considering whether to inline. This will be done in the<br>
|  simplifier (compiler/simplCore). Grepping for "inline" and "unfold" in<br>
|  simplCore/Simplify.hs (as well as reading the notes in that file) will<br>
|  likely be enough to get you started.<br>
|<br>
|  Do let me know if you still feel lost or want to discuss this further.<br>
|  I look forward to hearing how it goes.<br>
|<br>
|  Cheers,<br>
|<br>
|  - Ben<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">
|  _______________________________________________<br>
|  ghc-devs mailing list<br>
|  <a href="mailto:ghc-devs@haskell.org">ghc-devs@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%7ca1eb3c659f4a4e7b61e808d39c5a125c%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=2D8TJzAUIrAyMJCh3k8P0u07l2L267Jz5hzPHc56oR4%3d" target="_blank">
askell.org</a>%2fcgi-bin%2fmailman%2flistinfo%2fghc-<br>
|  devs&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%7ca1eb3c659f4a4e7b61e808d39c5a125c%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=KIjOeLVN%2fHBrSQo4B%2fVQQRBMUyTS5ZThXLW0Q3%2b9iOQ%3d" target="_blank">40064d.mgd.microsoft.com</a>%7c5ce47a744a1448f<br>
|  ff5cb08d38cc666b8%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=V22RG%2<br>
|  fAiO1lD5bLCR%2fXz2jv5QCzYAK5HUi6dDaAFQLA%3d<o:p></o:p></p>
</blockquote>
</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>
</div>
</body>
</html>