random-fu-0.0.0.2: Random number generationSource codeContentsIndex
Data.Random.Source
Synopsis
class Monad m => MonadRandom m where
getRandomBytes :: Int -> m [Word8]
getRandomWords :: Int -> m [Word64]
class Monad m => RandomSource m s where
getRandomBytesFrom :: s -> Int -> m [Word8]
getRandomWordsFrom :: s -> Int -> m [Word64]
Documentation
class Monad m => MonadRandom m whereSource

A typeclass for monads with a chosen source of entropy. For example, RVar is such a monad - the source from which it is (eventually) sampled is the only source from which a random variable is permitted to draw, so when directly requesting entropy for a random variable these functions are used.

The minimal definition is either getRandomBytes or getRandomWords.

Methods
getRandomBytes :: Int -> m [Word8]Source
get the specified number of random (uniformly distributed) bytes
getRandomWords :: Int -> m [Word64]Source
alternate basis function, providing access to larger chunks
show/hide Instances
class Monad m => RandomSource m s whereSource

A source of entropy which can be used in the given monad.

The minimal definition is either getRandomBytesFrom or getRandomWordsFrom

Methods
getRandomBytesFrom :: s -> Int -> m [Word8]Source
getRandomWordsFrom :: s -> Int -> m [Word64]Source
show/hide Instances
Produced by Haddock version 2.4.2