<br>On Thu, Nov 25, 2010 at 2:32 AM, Joachim Breitner <span dir="ltr">&lt;<a href="mailto:mail@joachim-breitner.de">mail@joachim-breitner.de</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

So I wonder:<br>
 * Is sharing values of type Int (and Bool and similar small values)<br>
always safe?<br>
 * If so: does GHC already do that?<br>
 * Would it be technically possible?<br>
 * Is there an established theory that can tell, for a sharing<br>
candidate, whether it is safe to share it?<br><br></blockquote><div><br></div><div>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.</div>

<div><br></div><div>    John</div></div>