úÎ S=Mä^       ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]:A source of entropy which can be used in the given monad. !The minimal definition is either  or  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  . Aget the specified number of random (uniformly distributed) bytes <alternate basis function, providing access to larger chunks      On systems that have it, /dev/,random is a handy-dandy ready-to-use source  of nonsense.  ^    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,  getRandomBytesFromRandomGenRef x can be  used as a  in `, a$, or any monad which is an instance  of b. It'#s generally probably better to use  ( though, as this one is likely to throw ' away a lot of perfectly good entropy.  Similarly, "getRandomWordsFromRandomGenState 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. See   See     Given a mutable reference to a c generator, we can make a  = usable in any monad in which the reference can be modified. For example, if x :: TVar PureMT, getRandomWordsFromMTRef x can be  used as a  in `, a$, or any monad which is an instance  of b.  Similarly, getRandomWordsFromMTState x can be used in any "state" ) monad in the mtl sense whose state is a c 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. 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 :A simple classification system covering the cases we care M about when sampling distributions. Loosely, these are the reasons we care: Q distributions over Fractional types are handled as if the type were continuous. ; distributions over Integral types are handled discretely. J distributions over Enum types (which are not Num instances) are handled - like Integral types, but require use of d and/or e to work with them. %classificiation system, experimental 1 c (a phantom type) is the classification system  t is the type to be classified ? tc (a phantom type) is the classification of t according to c KThe functional dependency, aside from being important because the relation 7 is functional, allows the classification system to be " discharged" in  cases such as the following:  F class Classification SomeCS t c => FooByClassification t c where ... 5 instance FooByClassification t c => Foo t where ... EThus the class of interest to the end user need not display anything H at all about the classification system, except in the superclasses of 7 the classes in the contexts of some of its instances. !A definition of a random variable''s distribution. From the distribution  an  > can be created, or the distribution can be directly sampled.   ! in particular is an instance of , and so can be d. $Minimum instance definition: either  or . 1Return a random variable with this distribution. BDirectly sample from the distribution, given a source of entropy. BSample a distribution using the default source of entropy for the % monad in which the sampling occurs.  An opaque type containing a "random variable" - a value 6 which depends on the outcome of some random process. 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.    !"#$%&'(f)*+,-.#$'(-!"%&.,)*+!""#$$%&&'(()*+,-. /0123gh312/0/001223 4567456745567 89::89899:;<=>?@AB>?@;=<AB;=<<=>?@ABCDEFGHEFGHCDCDDEFGHIJKLMKLMIJIJJKLMNOPQRSRSPQNONOOPQQRSTUVWVWTUTUUVWXYZ[\]XYZ[\]XYZ[\YZ[\]Y ^  !"#$%&'(f)*+,-./0123gh456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]i !"#$%&'())*+,-./011234567 89:; < = > > ? ? @ A B C D E F G H I J J K L M N O P Q R R STTUVWXYZ[[\]^_``abcddefghiijkllmnopqrstuvwxyxz { | }~random-fu-0.0.0.2Data.Random.Internal.WordsData.Random.SourceData.Random.Source.DevRandomData.Random.Source.StdGenData.Random.Source.PureMTData.Random.Source.Std#Data.Random.Internal.ClassificationData.Random.DistributionData.Random.RVar Data.Random.Distribution.Uniform"Data.Random.Distribution.Bernoulli$Data.Random.Distribution.Exponential!Data.Random.Distribution.DiscreteData.Random.Distribution.NormalData.Random.Distribution.GammaData.Random.Distribution.Beta!Data.Random.Distribution.Binomial Data.Random.Distribution.Poisson#Data.Random.Distribution.Triangularrandom-1.0.0.1 System.Randombase System.IOGHC.Conc mtl-1.1.0.2Control.Monad.Transmersenne-random-pure64-0.2.0.2System.Random.Mersenne.Pure64Prelude Data.Random wordsToBytes wordToBytes bytesToWords bytesToWord RandomSourcegetRandomBytesFromgetRandomWordsFrom MonadRandomgetRandomBytesgetRandomWords DevRandomgetRandomBytesFromStdGenIOgetRandomBytesFromRandomGenRef getRandomBytesFromRandomGenStategetRandomWordsFromRandomGenRef getRandomWordsFromRandomGenStategetRandomWordsFromMTRefgetRandomWordsFromMTState StdRandomEnumTypeFractionalType IntegralType NumericTypeClassification DistributionRVarrvar sampleFromsample nByteInteger nBitInteger StdUniformUniformStdUniformByClassificationstdUniformByClassificationUniformByClassificationuniformByClassificationboundedStdUniformboundedEnumStdUniformrealFloatStdUniformrealFloatUniformuniform stdUniform BernoulliBernoulliByClassificationbernoulliByClassification bernoulli ExponentialExprealFloatExponential exponentialDiscretediscreteNormal StdNormal normalPairknuthPolarNormalPairrealFloatStdNormal stdNormalnormalGammarealFloatGammarealFloatErlanggammaerlangBeta realFloatBetarealFloatBetaFromIntegralbetaBinomialBinomialByClassificationbinomialByClassificationintegralBinomialbinomialPoissonintegralPoissonpoisson TriangulartriLowertriMidtriUpperrealFloatTriangular devRandom RandomGen GHC.IOBaseIOSTMMonadIOPureMTGHC.EnumfromEnumtoEnumintegralUniform boolBernoulligeneralBernoulli