On Thu, Dec 11, 2008 at 2:05 PM, Andrew Coppin <span dir="ltr"><<a href="mailto:andrewcoppin@btinternet.com">andrewcoppin@btinternet.com</a>></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't provide the "hey you can store anything and retrieve it later" trick. ;-)<br>
</blockquote>
<br>
I would say that Data.STRef does exactly that.<br>
</blockquote>
<br></div>
That's true - but you can'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. Can you see how?<br><br>Luke<br></div></div><br>