pcg-random 0.1.1.0 → 0.1.2.0
raw patch · 4 files changed
+10/−6 lines, 4 filesdep ~primitive
Dependency ranges changed: primitive
Files
- CHANGELOG.md +4/−0
- pcg-random.cabal +2/−2
- src/System/Random/PCG.hs +2/−2
- src/System/Random/PCG/Fast.hs +2/−2
CHANGELOG.md view
@@ -1,3 +1,7 @@+### 0.1.2.0++* Allow primitive-0.6.+ ### 0.1.1.0 * Add uniformB, a function to generate a bounded random number in [0,b)
pcg-random.cabal view
@@ -1,5 +1,5 @@ name: pcg-random-version: 0.1.1.0+version: 0.1.2.0 synopsis: Haskell bindings to the PCG random number generator. description: PCG is a family of simple fast space-efficient statistically good@@ -44,7 +44,7 @@ other-extensions: BangPatterns, CPP, ForeignFunctionInterface build-depends: base >=4.3 && < 5,- primitive >=0.4 && < 0.6,+ primitive >=0.4 && < 0.7, random >=1.0 && < 2.0, time default-language: Haskell2010
src/System/Random/PCG.hs view
@@ -165,11 +165,11 @@ -- | Seed with system random number. (\"@\/dev\/urandom@\" on Unix-like -- systems, time otherwise).-withSystemRandom :: PrimMonad m => (Gen (PrimState m) -> m a) -> IO a+withSystemRandom :: (GenIO -> IO a) -> IO a withSystemRandom f = do w1 <- sysRandom w2 <- sysRandom- unsafePrimToIO $ initialize w1 w2 >>= f+ initialize w1 w2 >>= f -- | Seed a PRNG with data from the system's fast source of pseudo-random -- numbers. All the caveats of 'withSystemRandom' apply here as well.
src/System/Random/PCG/Fast.hs view
@@ -146,10 +146,10 @@ -- | Seed with system random number. (\"@\/dev\/urandom@\" on Unix-like -- systems, time otherwise).-withSystemRandom :: PrimMonad m => (Gen (PrimState m) -> m a) -> IO a+withSystemRandom :: (GenIO -> IO a) -> IO a withSystemRandom f = do w <- sysRandom- unsafePrimToIO $ initialize w >>= f+ initialize w >>= f -- | Seed a PRNG with data from the system's fast source of pseudo-random -- numbers. All the caveats of 'withSystemRandom' apply here as well.