úÎ zısôx      !"#$%&' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw A class for "liftable" data structures. Conceptually  an extension of x to allow deep lifting, > but lifting need not be done between monads only. Eg lifting  between  Applicatives is allowed. For instances where m and n have 'return'/'pure' defined,  these instances must satisfy  lift (return x) == return x.  Pack 23 unspecified bits from a y into a z in the range [0,1).  Used to convert a  stdUniform y to a  stdUniform {.  Pack 52 unspecified bits from a y into a { in the range [0,1).  Used to convert a  stdUniform y to a  stdUniform {. :A source of entropy which can be used in the given monad. !The minimal definition is either  or .   is defaulted in terms of  )Get a random uniformly-distributed byte.  Get a random y8 uniformly-distributed over the full range of the type.  Get a random {/ uniformly-distributed over the interval [0,1) FA typeclass for monads with a chosen source of entropy. For example,  RVarD is such a monad - the source from which it is (eventually) sampled J is the only source from which a random variable is permitted to draw, so H when directly requesting entropy for a random variable these functions  are used. !The minimal definition is either   or  .    is defaulted in terms of  . )Get a random uniformly-distributed byte.  Get a random y8 uniformly-distributed over the full range of the type.  Get a random {/ uniformly-distributed over the interval [0,1)      LA random variable with access to operations in an underlying monad. Useful W examples include any form of state for implementing random processes with hysteresis, F or writer monads for implementing tracing of complicated algorithms. |5single combined container allowing all the relevant ? dictionaries (plus the RandomSource item itself) to be passed  with one pointer. An opaque type containing a "random variable" - a value 6 which depends on the outcome of some random process. "Runs" the monad. EA random variable evenly distributed over all unsigned integers from  0 to 2^(8*n)-1, inclusive. EA random variable evenly distributed over all unsigned integers from  0 to 2^n-1, inclusive.    On systems that have it, /dev/,random is a handy-dandy ready-to-use source B of nonsense. Keep in mind that on some systems, Linux included, /dev/random  collects "real" entropy, and if you don'$t have a good source of it, such as C special hardware for the purpose or a *lot* of network traffic, it's pretty easy M to suck the entropy pool dry with entropy-intensive applications. For many # purposes other than cryptography, /dev/&urandom is preferable because when it  runs out of real entropy it'&ll still churn out pseudorandom data. A token representing the "standard" entropy source in a   P monad. Its sole purpose is to make the following true (when the types check): ! sampleFrom StdRandom === sample Given a mutable reference to a } generator, we can make a  = usable in any monad in which the reference can be modified. For example, if x :: TVar StdGen, getRandomByteFromRandomGenRef x can be  used as a  in ~, $, or any monad which is an instance  of €. It'#s generally probably better to use  ( though, as this one is likely to throw Q away a lot of perfectly good entropy. Better still is to use these 3 functions  together to create a  instance for the reference you' re using,  if one does not already exist.  Similarly, !getRandomWordFromRandomGenState x can be used in any "state" ) monad in the mtl sense whose state is a } generator. 2 Additionally, the standard mtl state monads have   instances 9 which do precisely that, allowing an easy conversion of RVars and  other  Distribution instances to "pure" random variables.    !Given a mutable reference to a  ! generator, we can make a  = usable in any monad in which the reference can be modified. For example, if x :: TVar PureMT, getRandomWordFromMTRef x can be  used as a  in ~, $, or any monad which is an instance  of €<. These functions can also be used to implement additional  % instances for mutable references to  ! states. $ Similarly, getRandomWordFromMTState x can be used in any "state" ) monad in the mtl sense whose state is a  ! generator. 2 Additionally, the standard mtl state monads have   instances 9 which do precisely that, allowing an easy conversion of RVars and  other  Distribution instances to "pure" random variables (e.g., by  ErunState . sample :: Distribution d t => d t -> PureMT -> (t, PureMT).   !& in the type there can be replaced by StdGen or anything else  satisfying MonadRandom (State s) => s). !"#$%&!"#$%&!"#$%& '!A definition of a random variable''s distribution. From the distribution  an D can be created, or the distribution can be directly sampled using   sampleFrom or sample. (1Return a random variable with this distribution. )QReturn a random variable with the given distribution, pre-lifted to an arbitrary  .  Any arbitrary  can also be converted to an 'RVarT m' for an arbitrary m, using  either  or sample. '()'()'(() 8Get a "standard" uniformly distributed value. J For integral types, this means uniformly distributed over the full range J of the type (and hence there is no support for Integer). For fractional @ types, this means uniformly distributed on the interval [0,1). *+,-./012345678,-7*+8.645/0312*++,--./012345678 ;>Generate a Bernoulli variate with the given probability. For Bool results,   bernoulli p< will return True (p*100)% of the time and False otherwise. < For numerical types, True is replaced by 1 and False by 0. <!A random variable whose value is ‚" the given fraction of the time  and ƒ" the rest. =generalBernoulli t f p, generates a random variable whose value is t  with probability p and f with probability 1-p. 9:;<=;<=9:9::;<= >?@A>?@A>??@A BCDEFGHIJKLM GHIJKDFEBCLM BCCDFEEFGHIJKLMNOPQRSTURSTUPQNONOOPQQRSTUVWXYZXYZVWVWWXYZ[\]^_]^_[\[\\]^_`abcdbcd`a`aabcdefghijefghijefghifghijo>Shuffle a list using interleaved IO when extracting elements. p Shuffle a „#$0 using interleaved IO when extracting elements. klmnopklmnopklmnopqrstsqrtqrrstuA typeclass allowing ' s and s to be sampled. Both may  also be sampled via  or  , but I find it psychologically 9 pleasing to be able to sample both using this function. v[Directly sample from a distribution or random variable, using the given source of entropy. wBSample a distribution using the default source of entropy for the % monad in which the sampling occurs. uvwuvwuvvw%s  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvw…&'()*+,-./0123456789:9;;<=>?@ABCDEFGHIJ K L M N N O O P Q R S T U V W X Y Z [ [ \ ] ^ _ ` a b c c d d e f g h i j k lmmnnopqrsstuvwwxyz{{|}~€‚ƒ„…†‡ˆ‰ŠŠ‹ŒŽ‘’“”•–—˜™š !›"œ"#$žŸrandom-fu-0.0.1.1Data.Random.LiftData.Random.Internal.WordsData.Random.SourceData.Random.RVarData.Random.Source.DevRandomData.Random.Source.StdData.Random.Source.StdGenData.Random.Source.PureMTData.Random.Distribution Data.Random.Distribution.Uniform"Data.Random.Distribution.Bernoulli$Data.Random.Distribution.ExponentialData.Random.Distribution.NormalData.Random.Distribution.GammaData.Random.Distribution.Beta!Data.Random.Distribution.Binomial Data.Random.Distribution.Poisson#Data.Random.Distribution.TriangularData.Random.List!Data.Random.Distribution.DiscreteData.Random.Sample mtl-1.1.0.2Control.Monad.Transbase Data.Wordghc-prim GHC.Typesrandom-1.0.0.1 System.Random System.IOGHC.Concmersenne-random-pure64-0.2.0.2System.Random.Mersenne.Pure64GHC.Boolcontainers-0.2.0.1 Data.Sequence Data.RandomLiftlift buildWord wordToFloat wordToDouble RandomSourcegetRandomByteFromgetRandomWordFromgetRandomDoubleFrom MonadRandom getRandomByte getRandomWordgetRandomDoubleRVarTRVarrunRVarrunRVarT nByteInteger nBitInteger DevRandom DevURandom StdRandomgetRandomByteFromStdGenIOgetRandomWordFromStdGenIOgetRandomDoubleFromStdGenIOgetRandomByteFromRandomGenRefgetRandomWordFromRandomGenRefgetRandomDoubleFromRandomGenRefgetRandomByteFromRandomGenStategetRandomWordFromRandomGenState!getRandomDoubleFromRandomGenStategetRandomWordFromMTRefgetRandomByteFromMTRefgetRandomDoubleFromMTRefgetRandomWordFromMTStategetRandomByteFromMTStategetRandomDoubleFromMTState DistributionrvarrvarT StdUniformUniformintegralUniformboundedStdUniformboundedEnumStdUniformfloatStdUniformdoubleStdUniformrealFloatStdUniform floatUniform doubleUniformrealFloatUniformuniform stdUniform Bernoulli bernoulli boolBernoulligeneralBernoulli ExponentialExpfloatingExponential exponential NormalPairNormal StdNormal normalPairboxMullerNormalPairknuthPolarNormalPairrealFloatStdNormaldoubleStdNormal stdNormalnormalErlangGammarealFloatGammarealFloatErlanggammaerlangBetafractionalBetafractionalBetaFromIntegralbetaBinomialintegralBinomialfloatingBinomialbinomialPoissonintegralPoissonfractionalPoissonpoisson TriangulartriLowertriMidtriUpperrealFloatTriangular randomElementrandomSeqElementshuffle shuffleSeqlazyShuffleFromlazyShuffleSeqFromDiscretediscretecollectDiscreteEvents Sampleable sampleFromsample MonadTransGHC.WordWord64FloatDoubleRVarDict RandomGen GHC.IOBaseIOSTMMonadIOPureMTTrueFalseSeq