Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype RandomM g a = RandomM {
- runRandomM :: g -> (a, g)
- runRandomMIO :: RandomM StdGen a -> IO a
- getRandomGen :: RandomM g g
- randomM :: (RandomGen g, Random a) => RandomM g a
- randomRM :: (RandomGen g, Random a) => (a, a) -> RandomM g a
- nRandomsR :: (RandomGen g, Random a) => Int -> ([a], [a]) -> RandomM g [a]
- nRandoms :: (RandomGen g, Random a) => Int -> RandomM g [a]
Documentation
RandomM | |
|
runRandomMIO :: RandomM StdGen a -> IO a Source #
Runs a random monad using the global RNG.
getRandomGen :: RandomM g g Source #
Fetches the generator inside the random monad.
randomM :: (RandomGen g, Random a) => RandomM g a Source #
Generates a random value inside the random monad.
randomRM :: (RandomGen g, Random a) => (a, a) -> RandomM g a Source #
Generates a bounded random value inside the random monad.