[Haskell-cafe] Mersenne-random and standard random API
yves.pares at gmail.com
Wed Feb 8 22:56:58 CET 2012
I've been in the past told that mersenne-random was much better than the
standard random package.
However, System.Random.Mersenne doesn't follow the general API described in
System.Random, MTGen is not an instance of RandomGen.
But a sample on System.Random.Mersenne.getStdRandom documentation (
rollDice :: IO Int
rollDice = getMTRandom (randomR (1,6))
It looks like wrong documentation (checking of older versions show that
getMTRandom have never lived or been exposed by this module), but suggests
MTRandom should be an instance of RandomGen (if I assume well that randomR
is that of System.Random).
So is it possible to use the fast and efficient mersenne generator with the
convenient and general random API?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe