random-bytestring-0.1.3.1: Efficient generation of random bytestrings

Copyright(c) Lars Kuhtz <lakuhtz@gmail.com> 2017
LicenseMIT
Maintainerlakuhtz@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.ByteString.Random.Internal

Description

 
Synopsis

Documentation

generate #

Arguments

:: RandomWords g 
=> g

PRNG

-> Natural

Length of the result bytestring in bytes

-> IO ByteString 

Generates uniformily distributed random bytestrings of length n using the given PRNG.

class RandomWords g where #

Methods

uniformW8 #

Arguments

:: g 
-> IO Word8

function that generates uniformily distributed random 8 bit words

uniformW64 #

Arguments

:: g 
-> IO Word64

function that generates uniformily distributed random 64 bit words

Instances
g ~ GenIO => RandomWords g # 
Instance details

Defined in Data.ByteString.Random.MWC

Methods

uniformW8 :: g -> IO Word8 #

uniformW64 :: g -> IO Word64 #

g ~ GenIO => RandomWords g # 
Instance details

Defined in Data.ByteString.Random.PCG

Methods

uniformW8 :: g -> IO Word8 #

uniformW64 :: g -> IO Word64 #