Why does RandomIO need the unsafePerformIO hack? (was:
[Haskell-cafe] Top-level state debate on the wiki)
GK at ninebynine.org
Fri Dec 3 05:05:08 EST 2004
Looking at the wiki summary  (very good, BTW), I have a question (I've
skipped much of the debate, so please just give a message pointer if I
Why does RandomIO need to use the unsafePerformIO hack if its already in
the IO monad?
BTW, if the goal is to have a random number generator as a pure (non-IO)
function, I *do* think there's a reasonable semantic objection here.
I'd also like to request that some reference links are added for some of
the proposed solutions:
2b - reference to stToIO
3 - reference to Data.Dynamic, and how a dictionary of types can be
used to provide global variables.
More information about the Haskell-Cafe