KO{      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyzACopyright (c) 2014-2015, Christopher Chalmers <c.chalmers@me.com>BSD3(Christopher Chalmers <c.chalmers@me.com> experimentalCPPNone 47<>LN0Generate a uniformly distributed random vairate.$Use entire range for integral types.#Use (0,1] range for floating types.FGenerate a uniformly distributed random vairate in the given range.'Use inclusive range for integral types.#Use (a,b] range for floating types.Generate a uniformly distributed random vairate in the range [0,b). For integral types the bound must be less than the max bound of {= (4294967295). Behaviour is undefined for negative bounds..Generate a random number using System.Entropy.%Use RDRAND if available and XOR with  /dev/urandomq on Unix and CryptAPI on Windows. This entropy is considered cryptographically secure but not true entropy.L  !"#$%&'()|}*+,-.~/  !"#$%&'()*+,-./  #$%& !"()'*+,-.F  !"#$%&'()|}*+,-.~ACopyright (c) 2014-2015, Christopher Chalmers <c.chalmers@me.com>BSD3(Christopher Chalmers <c.chalmers@me.com> experimentalCPP, FFINone+0357>?CILN 1$State of the random number generator2TImmutable state of a random number generator. Suitable for storing for later use.3Save the state of a 1 in a Seed.4 Restore a 1 from a Seed.5!Generate a new seed using single . initFrozen 0 FrozenGen 16Standard initial seed.7 Create a 1 from a fixed initial seed.8%Initialize a generator a single word.initialize 0 >>= save FrozenGen 19!Seed with system random number. ( /dev/urandom2 on Unix-like systems and CryptAPI on Windows).:\Run an action with a frozen generator, returning the result and the new frozen generator.;bSeed a PRNG with data from the system's fast source of pseudo-random numbers. All the caveats of 9 apply here as well.<oAdvance the given generator n steps in log(n) time. (Note that a "step" is a single random 32-bit (or less) . Data types such as  or  require two "steps".)@create >>= \g -> replicateM_ 1000 (uniformW32 g) >> uniformW32 g 3725702568=create >>= \g -> replicateM_ 500 (uniformD g) >> uniformW32 g 3725702568/create >>= \g -> advance 1000 g >> uniformW32 g 3725702568=IRetract the given generator n steps in log(2^64-n) time. This is just  advance (-n).,create >>= \g -> replicateM 3 (uniformW32 g)![2951688802,2698927131,361549788];create >>= \g -> retract 1 g >> replicateM 3 (uniformW32 g)![954135925,2951688802,2698927131]/0123456789:;<=4  !"#$%&'()/0123456789:;<=410/7;89:<=23465  #$%& !"()'/0123456789:;<=<Copyright (c) 2015, Christopher Chalmers <c.chalmers@me.com>BSD3(Christopher Chalmers <c.chalmers@me.com> experimentalCPP, FFINone+0357<>?CL IImmutable state of a random number generator. Suitable for storing for later use. newtype FrozenGen = FrozenGen Word64 deriving (Show, Eq, Ord, Storable, Data, Typeable, Generic)Save the state of a B in a Seed.J Restore a B from a Seed.K!Generate a new seed using single . initFrozen 0 FrozenGen 1LStandard initial seed.M Create a B from a fixed initial seed.NState of the random number generator newtype Gen s = Gen (MutableByteArray s) deriving (Eq, Ord) #if 710 >= 707 type role Gen representational #endif%Initialize a generator a single word.initialize 0 >>= save FrozenGen 1O"Seed with system random number. (" /dev/urandom+" on Unix-like systems, time otherwise).PbSeed a PRNG with data from the system's fast source of pseudo-random numbers. All the caveats of O apply here as well.QoAdvance the given generator n steps in log(n) time. (Note that a "step" is a single random 32-bit (or less) . Data types such as  or  require two "steps".)@create >>= \g -> replicateM_ 1000 (uniformW32 g) >> uniformW32 g 3725702568=create >>= \g -> replicateM_ 500 (uniformD g) >> uniformW32 g 3725702568/create >>= \g -> advance 1000 g >> uniformW32 g 3725702568RIRetract the given generator n steps in log(2^64-n) time. This is just  advance (-n).,create >>= \g -> replicateM 3 (uniformW32 g)![2951688802,2698927131,361549788];create >>= \g -> retract 1 g >> replicateM 3 (uniformW32 g)![954135925,2951688802,2698927131]>?@ABCDEFGHIJKLMNOPQRSTU=  !"#$%&'()>?@ABCDEFGHIJKLMNOPQRSTU=BA@MPNOQRSTU>?FHGDECIJLK  #$%& !"()'>?@ABCDEFGHIJKLMNOPQRSTUACopyright (c) 2014-2015, Christopher Chalmers <c.chalmers@me.com>BSD3(Christopher Chalmers <c.chalmers@me.com> experimentalCPP, FFINone7V$State of the random number generatorStandard initial seed.W Create a V from a fixed initial seed.XWCreate a generator from two words. Note: this is not the same as the two words in a Seed.Y"Seed with system random number. (" /dev/urandom+" on Unix-like systems, time otherwise).ZdSeed a PRNG with data from the system's fast source of pseudo-random numbers. All the caveats of Y apply here as well.[3Advance the given generator n steps in log(n) time.\IRetract the given generator n steps in log(2^64-n) time. This is just  advance (-n).VWXYZ[\,  !"#$%&'()VWXYZ[\,VWZXY[\  #$%& !"()' VWXYZ[\ACopyright (c) 2014-2015, Christopher Chalmers <c.chalmers@me.com>BSD3(Christopher Chalmers <c.chalmers@me.com> experimentalCPP, FFINone+0357>?CILN _$State of the random number generatoraSave the state of a _ in a Seed.b Restore a _ from a Seed.c!Generate a new seed using single . initFrozen 0FrozenGen 1876011003808476466dStandard initial seed.e Create a _ from a fixed initial seed.f%Initialize a generator a single word.initialize 0 >>= saveFrozenGen 1876011003808476466g!Seed with system random number. ( /dev/urandom2 on Unix-like systems and CryptAPI on Windows).h\Run an action with a frozen generator, returning the result and the new frozen generator.idSeed a PRNG with data from the system's fast source of pseudo-random numbers. All the caveats of g apply here as well.joAdvance the given generator n steps in log(n) time. (Note that a "step" is a single random 32-bit (or less) . Data types such as  or  require two "steps".)@create >>= \g -> replicateM_ 1000 (uniformW32 g) >> uniformW32 g 787992099=create >>= \g -> replicateM_ 500 (uniformD g) >> uniformW32 g 787992099/create >>= \g -> advance 1000 g >> uniformW32 g 787992099kIRetract the given generator n steps in log(2^64-n) time. This is just  advance (-n).,create >>= \g -> replicateM 3 (uniformW32 g)"[1499251125,2252584727,2021901712];create >>= \g -> retract 1 g >> replicateM 3 (uniformW32 g)"[4031155981,1499251125,2252584727]]^_`abcdefghijk4  !"#$%&'()]^_`abcdefghijk4_^]eifghjk`abdc  #$%& !"()']^_`abcdefghijkACopyright (c) 2014-2015, Christopher Chalmers <c.chalmers@me.com>BSD3(Christopher Chalmers <c.chalmers@me.com> experimentalCPP, FFINone +0357>?ILNlType alias of n specialized to .mType alias of n specialized to .n$State of the random number generatoro%Immutable snapshot of the state of a n.pSave the state of a n in a o.q Restore a n from a o.r Fixed seed.sGenerate a new seed using two s.initFrozen 0 0FrozenGen 6364136223846793006 1t Create a n from a fixed initial r.u&Initialize a generator with two words.initialize 0 0 >>= saveFrozenGen 6364136223846793006 1v!Seed with system random number. ( /dev/urandom2 on Unix-like systems and CryptAPI on Windows).w\Run an action with a frozen generator, returning the result and the new frozen generator.xbSeed a PRNG with data from the system's fast source of pseudo-random numbers. All the caveats of v apply here as well.yoAdvance the given generator n steps in log(n) time. (Note that a "step" is a single random 32-bit (or less) . Data types such as  or  require two "steps".)@create >>= \g -> replicateM_ 1000 (uniformW32 g) >> uniformW32 g 3640764222=create >>= \g -> replicateM_ 500 (uniformD g) >> uniformW32 g 3640764222/create >>= \g -> advance 1000 g >> uniformW32 g 3640764222zIRetract the given generator n steps in log(2^64-n) time. This is just  advance (-n).,create >>= \g -> replicateM 3 (uniformW32 g)[355248013,41705475,3406281715];create >>= \g -> retract 1 g >> replicateM 3 (uniformW32 g)[19683962,355248013,41705475]lmnopqrstuvwxyz4  !"#$%&'()lmnopqrstuvwxyz4nmltxuvwyzopqrs  #$%& !"()'lmnopqrstuvwxyz      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEF6789GHIJK:;<=>?@BCDLMN8>?@BCD6789:;<=>?@ABCD6789:;=<>?@ABCDOPQRSTUVWXYZ[\]^_`abcdefghijklmnOPopqr89stuvwxyz{|}wx=8~89wxOpq89wxpcgra_HjWUMbsC5vc3d9ekO8tRmJSystem.Random.PCG.ClassSystem.Random.PCG.FastSystem.Random.PCG.Fast.PureSystem.Random.PCG.UniqueSystem.Random.PCG.SingleSystem.Random.PCGUnsignedVariateuniformuniformRuniformB Generatoruniform1uniform2 uniform1B uniformI8 uniformI16 uniformI32 uniformI64 uniformW8 uniformW16 uniformW32 uniformW64 uniformBooluniformFuniformD uniformRI8 uniformRI16 uniformRI32 uniformRI64 uniformRW8 uniformRW16 uniformRW32 uniformRW64 uniformRBool uniformRF uniformRD uniformBI8 uniformBI16 uniformBI32 uniformBI64 uniformBW8 uniformBW16 uniformBW32 uniformBW64 uniformBBool uniformBF uniformBD wordsTo64Bit wordToBool wordToFloat wordsToDouble sysRandomGenSTGenIOGen FrozenGensaverestore initFrozenseedcreate initializewithSystemRandom withFrozencreateSystemRandomadvanceretractPairPstateoutputpairboundednxtu1u2u3baseGHC.WordWord32subadd uniformRangeTFCo:R:UnsignedWordTFCo:R:UnsignedIntTFCo:R:UnsignedWord64TFCo:R:UnsignedWord32TFCo:R:UnsignedWord16TFCo:R:UnsignedWord8TFCo:R:UnsignedInt64TFCo:R:UnsignedInt32TFCo:R:UnsignedInt16TFCo:R:UnsignedInt8$fVariate(,,,) $fVariate(,,) $fVariate(,) $fVariateInt $fVariateWord$fVariateDouble$fVariateFloat $fVariateBool$fVariateWord64$fVariateWord32$fVariateWord16$fVariateWord8$fVariateInt64$fVariateInt32$fVariateInt16 $fVariateInt8Word64ghc-prim GHC.TypesDoublepcg32f_advance_rpcg32f_boundedrand_rpcg32f_random_rpcg32f_srandom_r$fRandomGenFrozenGen$fGeneratorGenmGFfastMultiplier advancing advanceFastpcg32u_advance_rpcg32u_boundedrand_rpcg32u_random_rpcg32u_srandom_r$fGeneratorGenIOpcg32s_advance_rpcg32s_boundedrand_rpcg32s_random_rpcg32s_srandom_rGHC.STSTIOpcg32_advance_rpcg32_boundedrand_rpcg32_random_rpcg32_srandom_r$fStorableFrozenGen