Ah, and there&#39;s no core-&gt;haskell facility presently?  Thanks.<div><br></div><div>On Wed, Aug 24, 2011 at 12:14 AM, Edward Z. Yang <span dir="ltr">&lt;<a href="mailto:ezyang@mit.edu">ezyang@mit.edu</a>&gt;</span> wrote:</div>

<div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Since most of GHC&#39;s optimizations occur on core, not the user-friendly<br>
frontend language, doing so would be probably be nontrivial (e.g.<br>
we&#39;d want some sort of core to Haskell decompiler.)<br>
<br>
Edward<br>
<br>
Excerpts from Ryan Newton&#39;s message of Tue Aug 23 13:46:<a href="tel:45%20-0400%202011" value="+14504002011">45 -0400 2011</a>:<br>
<div><div></div><div class="h5">&gt; Edward,<br>
&gt;<br>
&gt; On first glance at your email I misunderstood you as asking about using<br>
&gt; GHC&#39;s optimizer as a source-to-source operation (using GHC as an optimizer,<br>
&gt; retrieving &quot;partially evaluated&quot; Haskell code).  That&#39;s not what you were<br>
&gt; asking for -- but is it possible?<br>
&gt;<br>
&gt;   -Ryan<br>
&gt;<br>
&gt; P.S.   One compiler that comes to mind that exposes this kind of thing<br>
&gt; nicely is Chez Scheme ( <a href="http://scheme.com/" target="_blank">http://scheme.com/</a> ).  In Chez you can get your<br>
&gt; hands on &quot;cp0&quot; which does a source to source transform (aka compiler pass<br>
&gt; zero, after macro expansion), and could use cp0 to preprocess the source and<br>
&gt; then print it back out.<br>
&gt;<br>
&gt; On Mon, Aug 22, 2011 at 8:48 AM, Edward Z. Yang &lt;<a href="mailto:ezyang@mit.edu">ezyang@mit.edu</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; I think this ticket sums it up very nicely!<br>
&gt; &gt;<br>
&gt; &gt; Cheers,<br>
&gt; &gt; Edward<br>
&gt; &gt;<br>
&gt; &gt; Excerpts from Max Bolingbroke&#39;s message of Mon Aug 22 04:07:59 -0400 2011:<br>
&gt; &gt; &gt; On 21 August 2011 19:20, Edward Z. Yang &lt;<a href="mailto:ezyang@mit.edu">ezyang@mit.edu</a>&gt; wrote:<br>
&gt; &gt; &gt; &gt; And no sooner do I send this email do I realize we have &#39;inline&#39;<br>
&gt; &gt; built-in,<br>
&gt; &gt; &gt; &gt; so I can probably experiment with this right now...<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; You may be interested in my related ticket #5029:<br>
&gt; &gt; &gt; <a href="http://hackage.haskell.org/trac/ghc/ticket/5059" target="_blank">http://hackage.haskell.org/trac/ghc/ticket/5059</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I don&#39;t think this is totally implausible but you have to be very<br>
&gt; &gt; &gt; careful with recursive functions.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Max<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Glasgow-haskell-users mailing list<br>
&gt; &gt; <a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
&gt; &gt; <a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
&gt; &gt;<br>
</div></div></blockquote></div><br></div>