random 1.0.1.3 → 1.1
raw patch · 7 files changed
+96/−8 lines, 7 filesdep ~basenew-uploader
Dependency ranges changed: base
Files
- .darcs-boring +5/−0
- .gitignore +12/−0
- .travis.yml +5/−0
- CHANGELOG.md +26/−0
- README.md +18/−0
- System/Random.hs +15/−1
- random.cabal +15/−7
+ .darcs-boring view
@@ -0,0 +1,5 @@+^dist(/|$)+^setup(/|$)+^GNUmakefile$+^Makefile.local$+^.depend(.bak)?$
+ .gitignore view
@@ -0,0 +1,12 @@+*~++Thumbs.db+.DS_Store++GNUmakefile+dist-install/+ghc.mk++dist+.cabal-sandbox+cabal.sandbox.config
+ .travis.yml view
@@ -0,0 +1,5 @@+language: haskell+ghc:+ - 7.4+ - 7.6+ - 7.8
+ CHANGELOG.md view
@@ -0,0 +1,26 @@+# 1.1+ * breaking change to `randomIValInteger` to improve RNG quality and performance+ see https://github.com/haskell/random/pull/4 and+ ghc https://ghc.haskell.org/trac/ghc/ticket/8898+ * correct documentation about generated range of Int32 sized values of type Int+ https://github.com/haskell/random/pull/7+ * fix memory leaks by using strict fields and strict atomicModifyIORef'+ https://github.com/haskell/random/pull/8+ related to ghc trac tickets #7936 and #4218+ * support for base < 4.6 (which doesnt provide strict atomicModifyIORef')+ and integrating Travis CI support.+ https://github.com/haskell/random/pull/12+ * fix C type in test suite https://github.com/haskell/random/pull/9++# 1.0.1.1+bump for overflow bug fixes++# 1.0.1.2+bump for ticket 8704, build fusion++# 1.0.1.0+bump for bug fixes,++# 1.0.0.4+bumped version for float/double range bugfix+
+ README.md view
@@ -0,0 +1,18 @@+The Haskell Standard Library -- Random Number Generation+========================================================+[](http://travis-ci.org/haskell/random)++This library provides a basic interface for (splittable) random number generators.++The API documentation can be found here:++ http://hackage.haskell.org/package/random/docs/System-Random.html++A module supplying this interface is required for Haskell 98 (but not Haskell+2010). An older [version]+(http://www.haskell.org/ghc/docs/latest/html/libraries/haskell98/Random.html)+of this library is included with GHC in the haskell98 package. This newer+version, with compatible api, is included in the [Haskell Platform]+(http://www.haskell.org/platform/contents.html).++Please report bugs in the Github [issue tracker] (https://github.com/haskell/random/issues) (no longer in the GHC trac).
System/Random.hs view
@@ -93,7 +93,12 @@ #endif import Data.Char ( isSpace, chr, ord ) import System.IO.Unsafe ( unsafePerformIO )-import Data.IORef+import Data.IORef ( IORef, newIORef, readIORef, writeIORef )+#if MIN_VERSION_base (4,6,0)+import Data.IORef ( atomicModifyIORef' )+#else+import Data.IORef ( atomicModifyIORef )+#endif import Numeric ( readDec ) #ifdef __GLASGOW_HASKELL__@@ -103,6 +108,15 @@ {-# INLINE build #-} build :: ((a -> [a] -> [a]) -> [a] -> [a]) -> [a] build g = g (:) []+#endif++#if !MIN_VERSION_base (4,6,0)+atomicModifyIORef' :: IORef a -> (a -> (a,b)) -> IO b+atomicModifyIORef' ref f = do+ b <- atomicModifyIORef ref+ (\x -> let (a, b) = f x+ in (a, a `seq` b))+ b `seq` return b #endif -- The standard nhc98 implementation of Time.ClockTime does not match
random.cabal view
@@ -1,14 +1,12 @@ name: random-version: 1.0.1.3+version: 1.1 --- 1.0.1.0 -- bump for bug fixes, but no SplittableGen yet--- 1.0.1.1 -- bump for overflow bug fixes--- 1.0.1.2 -- bump for ticket 8704, build fusion--- 1.0.1.3 -- bump for various bug fixes ++ license: BSD3 license-file: LICENSE-maintainer: rrnewton@gmail.com+maintainer: core-libraries-committee@haskell.org bug-reports: https://github.com/haskell/random/issues synopsis: random number library category: System@@ -16,6 +14,16 @@ This package provides a basic random number generation library, including the ability to split random number generators.++extra-source-files:+ .travis.yml+ README.md+ CHANGELOG.md+ .gitignore+ .darcs-boring+++ build-type: Simple -- cabal-version 1.8 needed because "the field 'build-depends: random' refers -- to a library which is defined within the same package"@@ -27,7 +35,7 @@ exposed-modules: System.Random extensions: CPP- GHC-Options: -O2 + GHC-Options: -O2 build-depends: base >= 3 && < 5, time source-repository head