partial evaluation

David Feuer
Fri, 1 Feb 2002 2:40:35 -0500

It seems to me that it might be useful (and probably 
fairly easy) to add to GHC a limited sort of partial 
evaluation: programmer-designated top-level CAFs could be 
evaluated to WHNF during compilation.  Termination of that 
compiler phase would obviously not be guaranteed, but if 
this were possible, I am guessing it would be very useful 
for some applications, such as combinator-based parsers.  
The parsers would then be generated at compiler time 
rather than re-generated every time the parser is 
executed.  If GHC in fact supports something of this 
nature, I would love to hear about it.  If it does not, I 
would guess it would probably be fairly easy to add to the 
end of the code generation phase.

David Feuer

This message has been brought to you by the letter alpha and the number pi.