On Thu, Dec 11, 2008 at 2:05 PM, Andrew Coppin <span dir="ltr">&lt;<a href="mailto:andrewcoppin@btinternet.com">andrewcoppin@btinternet.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Tillmann Rendel wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Andrew Coppin wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Except that, AFAIK, ST doesn&#39;t provide the &quot;hey you can store anything and retrieve it later&quot; trick. ;-)<br>
</blockquote>
<br>
I would say that Data.STRef does exactly that.<br>
</blockquote>
<br></div>
That&#39;s true - but you can&#39;t transport those from place to play. (By design.)</blockquote><div><br>If you could guarantee that the ID of a key is globally unique, even through different invocations of the monad (using eg. unsafePerformIO newUnique), then you could ensure type safety and allow transport of keys between different monads.<br>
<br>However, if you did this, then your library would not be referentially transparent.&nbsp; Can you see how?<br><br>Luke<br></div></div><br>