Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Control.Monad.Par.RNG
Contents
Description
This module defines another Par-related class to capture the random number generation capability.
The rand
operation provides deterministic parallel random
number generation from within a Par monad.
Most likely one will simply use the ParRand
the instance
provided in this file, which is based on a state transformer
carrying the random generator.
Synopsis
- class ParRand p where
- runParRand :: ParFuture fut p => (p a -> a) -> StateT StdGen p a -> IO a
- type ParRandStd par a = StateT StdGen par a
Documentation
class ParRand p where Source #
A ParRand
monad is a Par monad with support for random number generation..
Minimal complete definition
runParRand :: ParFuture fut p => (p a -> a) -> StateT StdGen p a -> IO a Source #
type ParRandStd par a = StateT StdGen par a Source #
A convenience type for the most standard
Orphan instances
RandomGen g => SplittableState g Source # | Trivial instance. |
Methods splitState :: g -> (g, g) Source # |