<div dir="ltr">Hi Simon, I am making progress but slowly (I only have time to work on this outside of work unfortunately).<div><br></div><div>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.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 24, 2016 at 4:20 AM, Simon Peyton Jones <span dir="ltr"><<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Richard, did you get on ok?<br>
<br>
Simon<br>
<div><div class="h5"><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" rel="noreferrer" 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<br>
</div></div>| _______________________________________________<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" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fmail.h</a><br>
| <a href="http://askell.org" rel="noreferrer" target="_blank">askell.org</a>%2fcgi-bin%2fmailman%2flistinfo%2fghc-<br>
| devs&data=01%7c01%7csimonpj%<a href="http://40064d.mgd.microsoft.com" rel="noreferrer" target="_blank">40064d.mgd.microsoft.com</a>%7c5ce47a744a1448f<br>
| ff5cb08d38cc666b8%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=V22RG%2<br>
| fAiO1lD5bLCR%2fXz2jv5QCzYAK5HUi6dDaAFQLA%3d<br>
</blockquote></div><br></div>