Really a function like mkWeakIORef should be exposed for STRef's.  I know there's supposed to be a patch to normalize various weak'ish things (ekmett?), maybe that function could be added at the same time. <br><br>Until then, I would suggesy unpacking the STRef to get at the underlying MutVar#, and copy the IORef code (which IIRC also works on MutVar#) to write the function yourself. <br><br>John L.<br><br><div class="gmail_quote">On 07:56, Mon, Dec 1, 2014 Wolfgang Jeltsch <<a href="mailto:g9ks157k@acme.softbase.org">g9ks157k@acme.softbase.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I need to convert values of types STRef RealWorld a to IORef a in order<br>
to attach finalizers to them. For now, I am using GHC.IORef for this. Is<br>
there a better way to achieve what I want?<br>
<br>
All the best,<br>
Wolfgang<br>
<br>
______________________________<u></u>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/libraries</a><br>
</blockquote></div>