MonadRandom 0.1.7 → 0.1.8
raw patch · 2 files changed
+4/−5 lines, 2 filesnew-uploaderPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Control/Monad/Random.hs +2/−3
- MonadRandom.cabal +2/−2
Control/Monad/Random.hs view
@@ -103,10 +103,9 @@ runRand :: (RandomGen g) => Rand g a -> g -> (a, g) runRand (Rand x) g = runIdentity (runRandT x g) --- | Evaluate a random computation in the IO monad, using the random number--- generator supplied by 'System.Random.getStdRandom'.+-- | Evaluate a random computation in the IO monad, splitting the global standard generator to get a new one for the computation. evalRandIO :: Rand StdGen a -> IO a-evalRandIO (Rand (RandT x)) = getStdRandom (runIdentity . runStateT x)+evalRandIO x = fmap (evalRand x) newStdGen -- | Sample a random value from a weighted list. The total weight of all -- elements must not be 0.
MonadRandom.cabal view
@@ -1,13 +1,13 @@ Name: MonadRandom Build-type: Simple-Version: 0.1.7+Version: 0.1.8 Synopsis: Random-number generation monad. Description: Support for computations which consume random values. License: OtherLicense License-file: LICENSE Category: Control Author: Cale Gibbard and others-Maintainer: Eric Kidd <haskell@randomhacks.net>+Maintainer: Stability: experimental Build-Depends: base >=2 && < 5, mtl, random Exposed-modules: Control.Monad.Random.Class, Control.Monad.Random