[Haskell-cafe] A curios monad
lrpalmer at gmail.com
Thu Dec 11 18:33:50 EST 2008
On Thu, Dec 11, 2008 at 2:05 PM, Andrew Coppin
<andrewcoppin at btinternet.com>wrote:
> Tillmann Rendel wrote:
>> Andrew Coppin wrote:
>>> Except that, AFAIK, ST doesn't provide the "hey you can store anything
>>> and retrieve it later" trick. ;-)
>> I would say that Data.STRef does exactly that.
> That's true - but you can't transport those from place to play. (By
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
However, if you did this, then your library would not be referentially
transparent. Can you see how?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe