On 1/12/07, Chad Scherrer <[EMAIL PROTECTED]> wrote:
Hi,
I'd like to be able to use randomIO, but I'm working within the
context of STM. Is there a way to get these working together happily?
For now, I guess I could kludgingly use unsafePerformIO inside STM
(it's the other way around that's not allowed, right?), but I would
need to be sure it doesn't get inlined.
You could use GHC.Conc.unsafeIOToSTM. Just be aware that your
transaction may be re-executed an arbitrary number of times.
--
Cheers,
Lemmih
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe