Ah, and there's no core->haskell facility presently? Thanks.<div><br></div><div>On Wed, Aug 24, 2011 at 12:14 AM, Edward Z. Yang <span dir="ltr"><<a href="mailto:ezyang@mit.edu">ezyang@mit.edu</a>></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's optimizations occur on core, not the user-friendly<br>
frontend language, doing so would be probably be nontrivial (e.g.<br>
we'd want some sort of core to Haskell decompiler.)<br>
<br>
Edward<br>
<br>
Excerpts from Ryan Newton'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">> Edward,<br>
><br>
> On first glance at your email I misunderstood you as asking about using<br>
> GHC's optimizer as a source-to-source operation (using GHC as an optimizer,<br>
> retrieving "partially evaluated" Haskell code). That's not what you were<br>
> asking for -- but is it possible?<br>
><br>
> -Ryan<br>
><br>
> P.S. One compiler that comes to mind that exposes this kind of thing<br>
> nicely is Chez Scheme ( <a href="http://scheme.com/" target="_blank">http://scheme.com/</a> ). In Chez you can get your<br>
> hands on "cp0" which does a source to source transform (aka compiler pass<br>
> zero, after macro expansion), and could use cp0 to preprocess the source and<br>
> then print it back out.<br>
><br>
> On Mon, Aug 22, 2011 at 8:48 AM, Edward Z. Yang <<a href="mailto:ezyang@mit.edu">ezyang@mit.edu</a>> wrote:<br>
><br>
> > I think this ticket sums it up very nicely!<br>
> ><br>
> > Cheers,<br>
> > Edward<br>
> ><br>
> > Excerpts from Max Bolingbroke's message of Mon Aug 22 04:07:59 -0400 2011:<br>
> > > On 21 August 2011 19:20, Edward Z. Yang <<a href="mailto:ezyang@mit.edu">ezyang@mit.edu</a>> wrote:<br>
> > > > And no sooner do I send this email do I realize we have 'inline'<br>
> > built-in,<br>
> > > > so I can probably experiment with this right now...<br>
> > ><br>
> > > You may be interested in my related ticket #5029:<br>
> > > <a href="http://hackage.haskell.org/trac/ghc/ticket/5059" target="_blank">http://hackage.haskell.org/trac/ghc/ticket/5059</a><br>
> > ><br>
> > > I don't think this is totally implausible but you have to be very<br>
> > > careful with recursive functions.<br>
> > ><br>
> > > Max<br>
> ><br>
> > _______________________________________________<br>
> > Glasgow-haskell-users mailing list<br>
> > <a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
> > <a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
> ><br>
</div></div></blockquote></div><br></div>