Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Gen s
- initializeFromSeed :: PrimMonad m => Int -> m (Gen (PrimState m))
- create :: PrimMonad m => m (Gen (PrimState m))
- initialize :: (PrimMonad m, Foldable f) => f Word -> m (Gen (PrimState m))
- initializeFromByteString :: PrimMonad m => ByteString -> m (Gen (PrimState m))
- withSystemRandom :: PrimBase m => (Gen (PrimState m) -> m a) -> IO a
- createSystemRandom :: IO GenIO
- type GenIO = Gen (PrimState IO)
- type GenST s = Gen (PrimState (ST s))
- asGenIO :: (GenIO -> IO a) -> GenIO -> IO a
- asGenST :: (GenST s -> ST s a) -> GenST s -> ST s a
- class Variate a where
- data Seed
- unsafeFromSeed :: Seed -> ByteString
- unsafeToSeed :: ByteString -> Seed
- save :: PrimMonad m => Gen (PrimState m) -> m Seed
- restore :: PrimMonad m => Seed -> m (Gen (PrimState m))
Gen
initializeFromByteString :: PrimMonad m => ByteString -> m (Gen (PrimState m)) Source
Type helpers
Variates
uniform :: PrimMonad m => Gen (PrimState m) -> m a Source
uniformR :: PrimMonad m => (a, a) -> Gen (PrimState m) -> m a Source
Variate Bool | |
Variate Double | |
Variate Float | |
Variate Int | |
Variate Int8 | |
Variate Int16 | |
Variate Int32 | |
Variate Int64 | |
Variate Word | |
Variate Word8 | |
Variate Word16 | |
Variate Word32 | |
Variate Word64 | |
(Variate a, Variate b) => Variate (a, b) | |
(Variate a, Variate b, Variate c) => Variate (a, b, c) | |
(Variate a, Variate b, Variate c, Variate d) => Variate (a, b, c, d) |
Seed
unsafeFromSeed :: Seed -> ByteString Source
unsafeToSeed :: ByteString -> Seed Source