<div dir="ltr"><div>This table outlines my plan for the compatibility of the pragmas.</div><div><br></div><div>Each cell is formatted as &quot;x/y&quot;, where &quot;x&quot; answers &quot;Is the original RHS in the interface file?&quot; and &quot;y&quot; answers &quot;Will GHC try to inline it?&quot;.</div>

<div><br></div><div><font face="courier new, monospace">               NOINLINE   INLINABLE   INLINE<br></font></div><div><span style="font-family:&#39;courier new&#39;,monospace">&lt;none&gt;         no/no      yes/yes     yes/enthusiastically</span></div>

<div><span style="font-family:&#39;courier new&#39;,monospace"><br></span></div><div><span style="font-family:&#39;courier new&#39;,monospace">NOINLINE       error      yes/no      error</span><br></div><div><font face="courier new, monospace">INLINABLE      -          error       error</font></div>

<div><div><font face="courier new, monospace">INLINE         -          -           error</font></div></div><div><br></div><div><font face="arial, helvetica, sans-serif">The proposed new &quot;yes/no&quot; option gives the GHC user more control. It prevents GHC from inlining a function while still supporting the ability to use the annotated function&#39;s RHS in another module, via SPECIALISE or the special &quot;inline&quot; function. Moreover, the presence of the RHS in the .hi file could be used by tools other than GHC like plugins or a super-compiler.</font></div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 18, 2013 at 4:20 AM, Simon Peyton-Jones <span dir="ltr">&lt;<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">It seems a little weird, but the internal data types can express it, so if you can make the front end do the right thing I’d be happy
 to take it.  (Don’t forget the manual.)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">SImon<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></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:&quot;Calibri&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;"> ghc-devs [mailto:<a href="mailto:ghc-devs-bounces@haskell.org" target="_blank">ghc-devs-bounces@haskell.org</a>]
<b>On Behalf Of </b>Nicolas Frisby<br>
<b>Sent:</b> 16 July 2013 21:29<br>
<b>To:</b> <a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<b>Subject:</b> Re: defunctionalization<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p>Ah, I misread that TidyPgm function.It looks like if I build the CoreUnfolding, GHC will respect it. It&#39;s just rejecting the pragma combination in HsSyn.<u></u><u></u></p>
<p>On Jul 16, 2013 3:22 PM, &quot;Nicolas Frisby&quot; &lt;<a href="mailto:nicolas.frisby@gmail.com" target="_blank">nicolas.frisby@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; I&#39;d like to put a NOINLINE and an INLINABLE pragma on a binding.<br>
&gt;<br>
&gt; (I&#39;m sketching a defunctionalization pass. I&#39;d like the &#39;apply` routine RHS to make it into the interface file, but I do not want it to be inlined, since that&#39;d undo the defunctionalization.)<br>
&gt;<br>
&gt; In other words, I&#39;d like a CoreUnfolding value with the uf_guidance = UnfNever.<br>
&gt;<br>
&gt; It seems TidyPgm.addExternal ignores such a core unfolding.<br>
&gt;<br>
&gt; Would GHC consider a patch to make this work?<br>
&gt;<br>
&gt; Thanks.<u></u><u></u></p>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>