
19 Aug
2006
19 Aug
'06
6:32 p.m.
On Sun, 13 Aug 2006, Marc Weber wrote:
the rand* function are examples for a typical state usage, arent' they? Is there any reasoon why they are not defined RandomGen g => State g a rather than RandomGen g => (a,a) -> g -> (a,g) ?
It's probably because Control.Monad.State belongs to the MTL which is outside Prelude. Nonetheless I find it also more convenient to use the State monad for random number generators: http://darcs.haskell.org/htam/src/Stochastic.hs http://www.haskell.org/pipermail/haskell-cafe/2005-May/009775.html