MonadRandom 0.2.0.1 → 0.3
raw patch · 3 files changed
+15/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Control.Monad.Random: liftRand :: (RandomGen g, Random a) => (g -> (a, g)) -> Rand g a
+ Control.Monad.Random: liftRand :: RandomGen g => (g -> (a, g)) -> Rand g a
- Control.Monad.Random: liftRandT :: (Monad m, RandomGen g, Random a) => (g -> m (a, g)) -> RandT g m a
+ Control.Monad.Random: liftRandT :: (Monad m, RandomGen g) => (g -> m (a, g)) -> RandT g m a
- Control.Monad.Random: type Rand g a = RandT g Identity a
+ Control.Monad.Random: type Rand g = RandT g Identity
Files
- CHANGES.markdown +11/−0
- Control/Monad/Random.hs +3/−3
- MonadRandom.cabal +1/−1
CHANGES.markdown view
@@ -1,3 +1,14 @@+0.3 (4 September 2014)+----------------------++ - Eta-reduce definition of `Rand`+ - Remove unnecessary `Random a` constraint from types of `liftRand`+ and `liftRandT`.++ Note that a major version bump is required by the PVP since the+ types of `liftRand` and `liftRandT` have changed, but this release+ is highly unlikely to break any client code.+ 0.2.0.1 (24 August 2014) ------------------------
Control/Monad/Random.hs view
@@ -88,13 +88,13 @@ return x -- | Lift arbitrary action to RandT-liftRandT :: (Monad m, RandomGen g, Random a) =>+liftRandT :: (Monad m, RandomGen g) => (g -> m (a, g)) -- ^ action returning value and new generator state -> RandT g m a liftRandT = RandT . StateT -- | Lift arbitrary action to Rand-liftRand :: (RandomGen g, Random a) =>+liftRand :: (RandomGen g) => (g -> (a, g)) -- ^ action returning value and new generator state -> Rand g a liftRand = RandT . liftState@@ -121,7 +121,7 @@ runRandT (RandT x) g = runStateT x g -- | A basic random monad.-type Rand g a = RandT g Identity a+type Rand g = RandT g Identity -- | Evaluate a random computation using the generator @g@. Note that the -- generator @g@ is not returned, so there's no way to recover the
MonadRandom.cabal view
@@ -1,5 +1,5 @@ name: MonadRandom-version: 0.2.0.1+version: 0.3 synopsis: Random-number generation monad. description: Support for computations which consume random values. license: OtherLicense