Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
randomRs :: (Random a, RandomGen g) => (a, a) -> g -> [a]random System.Random Plural variant of randomR, producing an infinite list of pseudo-random values instead of returning a new generator.
randoms :: (Random a, RandomGen g) => g -> [a]random System.Random Plural variant of random, producing an infinite list of pseudo-random values instead of returning a new generator.
randomM :: (RandomGenM g r m, Random a) => g -> m arandom System.Random.Stateful Generates a pseudo-random value using monadic interface and Random instance.
Examples
>>> import System.Random.Stateful >>> let pureGen = mkStdGen 137 >>> g <- newIOGenM pureGen >>> randomM g :: IO Double 0.5728354935654512
randomRM :: (RandomGenM g r m, Random a) => (a, a) -> g -> m arandom System.Random.Stateful Generates a pseudo-random value using monadic interface and Random instance.
Examples
>>> import System.Random.Stateful >>> let pureGen = mkStdGen 137 >>> g <- newIOGenM pureGen >>> randomRM (1, 100) g :: IO Int 52
-
mwc-random System.Random.MWC.SeedSource Name of source of randomness. It should be used in error messages
randomDouble :: PureMT -> (Double, PureMT)mersenne-random-pure64 System.Random.Mersenne.Pure64 Efficiently yield a new 53-bit precise Double value, and a new generator.
randomInt :: PureMT -> (Int, PureMT)mersenne-random-pure64 System.Random.Mersenne.Pure64 Yield a new Int value from the generator, returning a new generator and that Int. The full 64 bits will be used on a 64 bit machine.
randomInt64 :: PureMT -> (Int64, PureMT)mersenne-random-pure64 System.Random.Mersenne.Pure64 Yield a new Int64 value from the generator, returning a new generator and that Int64.
randomWord :: PureMT -> (Word, PureMT)mersenne-random-pure64 System.Random.Mersenne.Pure64 Yield a new Word value from the generator, returning a new generator and that Word.
randomWord64 :: PureMT -> (Word64, PureMT)mersenne-random-pure64 System.Random.Mersenne.Pure64 Yield a new Word64 value from the generator, returning a new generator and that Word64.