[Haskell-cafe] Safer common subexpression elimination

John Meacham john at repetae.net
Sun Nov 28 04:36:17 CET 2010

On Thu, Nov 25, 2010 at 2:32 AM, Joachim Breitner
<mail at joachim-breitner.de>wrote:

> So I wonder:
>  * Is sharing values of type Int (and Bool and similar small values)
> always safe?
>  * If so: does GHC already do that?
>  * Would it be technically possible?
>  * Is there an established theory that can tell, for a sharing
> candidate, whether it is safe to share it?
Jhc does this for simple types, which are unary constructors with a
primitive argument (CPR types). I never actually ran tests to see how much
it helps if any.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101127/219caad7/attachment.html

More information about the Haskell-Cafe mailing list