I also would like a <font face="-webkit-sans-serif"><span style="font-size: small;">isStableNameTargetAlive</span></font> function.<br>Though if you had such a function then you probably _could_ make a <span style="font-family: -webkit-sans-serif; font-size: 16px;"><tt style="font-size: 13px;">deRefStableName</tt></span> function, which, since there isn&#39;t one, probably means that such a function would be hard to make. <br>
<br>- Job<br><br><div class="gmail_quote">On Sun, Aug 30, 2009 at 4:54 PM, Peter Verswyvelen <span dir="ltr">&lt;<a href="mailto:bugfact@gmail.com">bugfact@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt;From the documentation, I don&#39;t think I grasp how stable names work.<div><br></div><div>From the docs:</div><div><div><span style="font-family: -webkit-sans-serif; font-size: 16px;">&quot;There is no <tt style="font-size: 13px;">deRefStableName</tt> operation. You can&#39;t get back from a stable name to the original Haskell object. The reason for this is that the existence of a stable name for an object does not guarantee the existence of the object itself; it can still be garbage collected.&quot;</span></div>

<div><font size="4" face="-webkit-sans-serif"><span style="font-size: 16px;"><br></span></font></div><div><font face="-webkit-sans-serif"><span style="font-size: small;">From this I can conclude that stable names behave a bit like weak pointers.</span></font></div>

<div><font face="-webkit-sans-serif"><span style="font-size: small;"><br></span></font></div><div><font face="-webkit-sans-serif"><span style="font-size: small;">However, suppose I have a hash table of these stable names. How can I remove the redundant stable names from the table? I mean removing stable names that refer to an object that is garbage collected? I don&#39;t see any function for checking that (e.g. isStableNameTargetAlive or something)</span></font></div>

<div><font face="-webkit-sans-serif"><br></font></div><div><font face="-webkit-sans-serif">Thanks,</font></div><div><font face="-webkit-sans-serif">Peter</font></div>
<div><font face="-webkit-sans-serif"><br></font></div><div><font face="-webkit-sans-serif"><span style="font-size: small;"><br></span></font></div>
<div><font size="4" face="-webkit-sans-serif"><span style="font-size: 16px;"><br></span></font></div><div><font size="4" face="-webkit-sans-serif"><span style="font-size: 16px;"><br>
</span></font></div></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br>