Haskell Core Libraries (base package)ParentContentsIndex
System.Random
Portability portable
Stability provisional
Maintainer libraries@haskell.org
Description
Random numbers.
class RandomGen g where
Methods
next :: g -> (Int, g)
split :: g -> (g, g)
genRange :: g -> (Int, Int)
Instances
RandomGen StdGen
data StdGen
Instances
RandomGen StdGen
Show StdGen
Read StdGen
mkStdGen :: Int -> StdGen
class Random a where
Methods
random :: (RandomGen g) => g -> (a, g)
randomR :: (RandomGen g) => (a, a) -> g -> (a, g)
randoms :: (RandomGen g) => g -> [a]
randomRs :: (RandomGen g) => (a, a) -> g -> [a]
randomIO :: IO a
randomRIO :: (a, a) -> IO a
Instances
Random Int
Random Char
Random Bool
Random Integer
Random Double
Random Float
getStdRandom :: (StdGen -> (a, StdGen)) -> IO a
getStdGen :: IO StdGen
setStdGen :: StdGen -> IO ()
newStdGen :: IO StdGen
Produced by Haddock version 0.4