Wow, lots of great ideas. Thanks, guys.

Lemmih,
I worry about the uncertainty in the semantics that seems to be
introduced by the unsafe stuff. But I actually hadn't noticed
GHC.Conc.unsafeIOToSTM before, so it's good to know it's there.

Rich,
Even if I use randomIO outside the STM code, I don't know of a (safe)
way to bring it in. Anyway, the number of random values needed depends
on other stuff going on within the STM part.

Christian,
I think setStdGen has the same problem as just using randomIO and
ignoring the initial seed - there's no nice way of moving the (IO a)
value generated into the STM monad.

Rob, Henning,
I think I'll take this approach, or something similar. Thanks for the pointers.

-Chad
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to