StatefulGen is an interface to monadic pseudo-random number generators.
Methods
uniformWord32R :: Word32 -> g -> m Word32uniformWord32R upperBound ggenerates a Word32 that is uniformly distributed over the range[0, upperBound].uniformWord64R :: Word64 -> g -> m Word64uniformWord64R upperBound ggenerates a Word64 that is uniformly distributed over the range[0, upperBound].uniformWord8 :: g -> m Word8Generates a Word8 that is uniformly distributed over the entire Word8 range.
The default implementation extracts a Word8 from uniformWord32.
uniformWord16 :: g -> m Word16Generates a Word16 that is uniformly distributed over the entire Word16 range.
The default implementation extracts a Word16 from uniformWord32.
uniformWord32 :: g -> m Word32Generates a Word32 that is uniformly distributed over the entire Word32 range.
The default implementation extracts a Word32 from uniformWord64.
uniformWord64 :: g -> m Word64Generates a Word64 that is uniformly distributed over the entire Word64 range.
The default implementation combines two Word32 from uniformWord32 into one Word64.
uniformShortByteString :: Int -> g -> m ShortByteStringuniformShortByteString n ggenerates a ShortByteString of lengthnfilled with pseudo-random bytes.
Instances5StatefulGen
RandomGen g => StatefulGen (TGenM g) STMDefined in random-1.2.1.3 · System.Random.Stateful(RandomGen g, MonadIO m) => StatefulGen (AtomicGenM g) mDefined in random-1.2.1.3 · System.Random.Stateful(RandomGen g, MonadIO m) => StatefulGen (IOGenM g) mDefined in random-1.2.1.3 · System.Random.Stateful(RandomGen g, MonadState g m) => StatefulGen (StateGenM g) mDefined in random-1.2.1.3 · System.Random.InternalRandomGen g => StatefulGen (STGenM g s) (ST s)Defined in random-1.2.1.3 · System.Random.Stateful