packages feed

monadcryptorandom 0.5.1 → 0.5.2

raw patch · 2 files changed

+5/−2 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Control.Monad.CryptoRandom: instance CRandom Bool

Files

Control/Monad/CryptoRandom.hs view
@@ -27,7 +27,7 @@   ) where  import Control.Applicative-import Control.Arrow (right, left)+import Control.Arrow (right, left, first) import Control.Monad (liftM) import Control.Monad.Cont import Control.Monad.Error@@ -255,6 +255,9 @@ instance CRandomR Int64 where   crandomR = crandomR_Num   {-# INLINE crandomR #-}++instance CRandom Bool where+  crandom g = first (toEnum . fromIntegral) `fmap` crandomR (0::Word8,1) g  crandomR_Num :: (Integral a, CryptoRandomGen g) => (a,a) -> g -> Either GenError (a,g) crandomR_Num (low, high) g
monadcryptorandom.cabal view
@@ -1,5 +1,5 @@ name:           monadcryptorandom-version:        0.5.1+version:        0.5.2 license:        BSD3 license-file:   LICENSE copyright:      Thomas DuBuisson <thomas.dubuisson@gmail.com>