Well usually, when I&#39;ve used stable names, I&#39;ve just used them to check if things are the same, and then thrown them away. So no chance for a space leak. It&#39;s usually unsafe to keep stable names around for very long as they can lose their ability to tell if two things are the same (if this surprises you, you should carefully reread <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/System-Mem-StableName.html#v%3AmakeStableName">http://haskell.org/ghc/docs/latest/html/libraries/base/System-Mem-StableName.html#v%3AmakeStableName</a> ).<br>
<br>Out of curiosity, how are you planning on using them?<br><br>- Job<br><br><div class="gmail_quote">On Tue, Sep 1, 2009 at 3:40 AM, 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;">but without that function, stable names are not that useful I guess? they would cause a space leak?<div>
<div></div><div class="h5"><div><div><div><div><br><div class="gmail_quote">On Mon, Aug 31, 2009 at 10:59 PM, Job Vranish <span dir="ltr">&lt;<a href="mailto:jvranish@gmail.com" target="_blank">jvranish@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;">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"><div><div></div><div>On Sun, Aug 30, 2009 at 4:54 PM, Peter Verswyvelen <span dir="ltr">&lt;<a href="mailto:bugfact@gmail.com" target="_blank">bugfact@gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
&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></div></div>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">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>
</blockquote></div><br></div></div></div></div>
</div></div></blockquote></div><br>