[Haskell-beginners] Random computation with fixed seed value (Control.Monad.Random)

Jan Snajder jan.snajder at fer.hr
Fri Nov 26 02:20:38 EST 2010


I'd like to evaluate a random computation using Control.Monad.Random,
but I'd like to be able to fix the seed value. I know I can use mkStdGen
from System.Random to get an initial generator. I also know I can use

evalRand :: RandomGen g => Rand g a -> g -> a

from Control.Monad.Random to evaluate a random computation. But the
problem is I don't see how I can turn a StdGen value that I get from
mkStdGen into a Rand type. What am I missing here?


More information about the Beginners mailing list