Or a StableName? I guess StablePtr prevents the GC to move the Haskell object, so for just doing ugly comparing StableName would be better?<div> <br><div class="gmail_quote">On Mon, Apr 20, 2009 at 12:45 AM, Lennart Augustsson <span dir="ltr">&lt;<a href="mailto:lennart@augustsson.net">lennart@augustsson.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">And when the need gets big enough you pull out StablePtr and use that. :)<br>
<div><div></div><div class="h5"><br>
On Sun, Apr 19, 2009 at 10:43 PM, Peter Verswyvelen &lt;<a href="mailto:bugfact@gmail.com">bugfact@gmail.com</a>&gt; wrote:<br>
&gt; Sometimes I do miss the pragmatic C solution:<br>
&gt; - two function pointers that are equal surely represent the same functions<br>
&gt; (although in C nothing is really sure ;)<br>
&gt; - two function pointers that are different, might or might not represent<br>
&gt; that same functions.<br>
&gt; But this weak equality can sometimes be handy.<br>
&gt; For example, suppose you have a predicate a -&gt; Bool, and a list of these<br>
&gt; predicates [a -&gt; Bool], but you want to remove all functions that are<br>
&gt; obviously equal in the C way from the list for optimization... Okay big<br>
&gt; hack, and one could do this already with reallyUnsafePtrEquality# I guess...<br>
&gt; On Sat, Apr 18, 2009 at 6:02 PM, John A. De Goes &lt;<a href="mailto:john@n-brain.net">john@n-brain.net</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Two functions are equal iff they have the same domain and range and the<br>
&gt;&gt; same outputs for the same inputs. Simple to state, but extremely difficult<br>
&gt;&gt; to implement in a useful way, and impossible to implement in a perfect way.<br>
&gt;&gt;<br>
&gt;&gt; If you had a compiler or algorithm capable of determining function<br>
&gt;&gt; equality, you could use it to prove or disprove arbitrary theorems in<br>
&gt;&gt; mathematics.<br>
&gt;<br>
</div></div><div><div></div><div class="h5">&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>