Cheap and cheerful partial evaluation
rrnewton at gmail.com
Tue Aug 23 19:46:45 CEST 2011
On first glance at your email I misunderstood you as asking about using
GHC's optimizer as a source-to-source operation (using GHC as an optimizer,
retrieving "partially evaluated" Haskell code). That's not what you were
asking for -- but is it possible?
P.S. One compiler that comes to mind that exposes this kind of thing
nicely is Chez Scheme ( http://scheme.com/ ). In Chez you can get your
hands on "cp0" which does a source to source transform (aka compiler pass
zero, after macro expansion), and could use cp0 to preprocess the source and
then print it back out.
On Mon, Aug 22, 2011 at 8:48 AM, Edward Z. Yang <ezyang at mit.edu> wrote:
> I think this ticket sums it up very nicely!
> Excerpts from Max Bolingbroke's message of Mon Aug 22 04:07:59 -0400 2011:
> > On 21 August 2011 19:20, Edward Z. Yang <ezyang at mit.edu> wrote:
> > > And no sooner do I send this email do I realize we have 'inline'
> > > so I can probably experiment with this right now...
> > You may be interested in my related ticket #5029:
> > http://hackage.haskell.org/trac/ghc/ticket/5059
> > I don't think this is totally implausible but you have to be very
> > careful with recursive functions.
> > Max
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Glasgow-haskell-users