commit ghc-splitmix for openSUSE:Factory

2020-10-27 Thread root
Hello community,

here is the log from the commit of package ghc-splitmix for openSUSE:Factory 
checked in at 2020-10-27 19:03:09

Comparing /work/SRC/openSUSE:Factory/ghc-splitmix (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3463 (New)


Package is "ghc-splitmix"

Tue Oct 27 19:03:09 2020 rev:10 rq:844311 version:0.1.0.3

Changes:

--- /work/SRC/openSUSE:Factory/ghc-splitmix/ghc-splitmix.changes
2020-10-23 15:14:56.478151431 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3463/ghc-splitmix.changes  
2020-10-27 19:03:24.778938293 +0100
@@ -1,0 +2,15 @@
+Fri Oct 23 02:03:35 UTC 2020 - psim...@suse.com
+
+- Update splitmix to version 0.1.0.3.
+  # 0.1.0.3
+
+  - Fix oops bugs in 0.1.0.2
+
+- It's lowercase `windows.h`.
+  I blame Microsoft docs for using capital case `Windows.h` in the docs.
+  
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getprocessid
+
+- accidental `shiftL` vs `shiftR` mixup for 32-bit generator 
initialization.
+  Doesn't affect Linux.
+
+---

Old:

  splitmix-0.1.0.2.tar.gz

New:

  splitmix-0.1.0.3.tar.gz



Other differences:
--
++ ghc-splitmix.spec ++
--- /var/tmp/diff_new_pack.j7b0nU/_old  2020-10-27 19:03:25.450938782 +0100
+++ /var/tmp/diff_new_pack.j7b0nU/_new  2020-10-27 19:03:25.454938784 +0100
@@ -19,7 +19,7 @@
 %global pkg_name splitmix
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:0.1.0.2
+Version:0.1.0.3
 Release:0
 Summary:Fast Splittable PRNG
 License:BSD-3-Clause

++ splitmix-0.1.0.2.tar.gz -> splitmix-0.1.0.3.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.1.0.2/Changelog.md 
new/splitmix-0.1.0.3/Changelog.md
--- old/splitmix-0.1.0.2/Changelog.md   2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.1.0.3/Changelog.md   2001-09-09 03:46:40.0 +0200
@@ -1,3 +1,14 @@
+# 0.1.0.3
+
+- Fix oops bugs in 0.1.0.2
+
+  - It's lowercase `windows.h`.
+I blame Microsoft docs for using capital case `Windows.h` in the docs.
+
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getprocessid
+
+  - accidental `shiftL` vs `shiftR` mixup for 32-bit generator initialization.
+Doesn't affect Linux.
+
 # 0.1.0.2
 
 - Drop `time` dependency in favour of handcoded initialization
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.1.0.2/cbits-win/init.c 
new/splitmix-0.1.0.3/cbits-win/init.c
--- old/splitmix-0.1.0.2/cbits-win/init.c   2001-09-09 03:46:40.0 
+0200
+++ new/splitmix-0.1.0.3/cbits-win/init.c   2001-09-09 03:46:40.0 
+0200
@@ -1,6 +1,6 @@
 #include 
 
-#include 
+#include 
 
 uint64_t splitmix_init() {
 /* Handy list at https://stackoverflow.com/a/3487338/1308058 */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.1.0.2/splitmix.cabal 
new/splitmix-0.1.0.3/splitmix.cabal
--- old/splitmix-0.1.0.2/splitmix.cabal 2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.1.0.3/splitmix.cabal 2001-09-09 03:46:40.0 +0200
@@ -1,6 +1,6 @@
 cabal-version:  >=1.10
 name:   splitmix
-version:0.1.0.2
+version:0.1.0.3
 synopsis:   Fast Splittable PRNG
 description:
   Pure Haskell implementation of SplitMix described in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.1.0.2/src/System/Random/SplitMix32.hs 
new/splitmix-0.1.0.3/src/System/Random/SplitMix32.hs
--- old/splitmix-0.1.0.2/src/System/Random/SplitMix32.hs2001-09-09 
03:46:40.0 +0200
+++ new/splitmix-0.1.0.3/src/System/Random/SplitMix32.hs2001-09-09 
03:46:40.0 +0200
@@ -371,4 +371,4 @@
 initialSeed' :: IO Word32
 initialSeed' = do
 w64 <- initialSeed
-return (fromIntegral (shiftL w64 32) `xor` fromIntegral w64)
+return (fromIntegral (shiftR w64 32) `xor` fromIntegral w64)




commit ghc-splitmix for openSUSE:Factory

2020-10-23 Thread root
Hello community,

here is the log from the commit of package ghc-splitmix for openSUSE:Factory 
checked in at 2020-10-23 15:14:53

Comparing /work/SRC/openSUSE:Factory/ghc-splitmix (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3463 (New)


Package is "ghc-splitmix"

Fri Oct 23 15:14:53 2020 rev:9 rq:842765 version:0.1.0.2

Changes:

--- /work/SRC/openSUSE:Factory/ghc-splitmix/ghc-splitmix.changes
2020-08-28 21:38:31.716813357 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3463/ghc-splitmix.changes  
2020-10-23 15:14:56.478151431 +0200
@@ -1,0 +2,14 @@
+Tue Oct 20 02:03:27 UTC 2020 - psim...@suse.com
+
+- Update splitmix to version 0.1.0.2.
+  # 0.1.0.2
+
+  - Drop `time` dependency in favour of handcoded initialization
+- On Unix platforms we use `/dev/urandom` if it exists,
+  otherwise use `gettimeofday`, `clock` and `getpid`.
+- On Windows we use `GetCurrentProcessID`, `GetCurrentThreadId()`,
+  `GetTickCount`, `GetSystemTime` and `QueryPerformanceCounter`.
+- On GHCJS use `Math.random()`
+- Using `time` is a fallback option (e.g. for Hugs).
+
+---

Old:

  splitmix-0.1.0.1.tar.gz

New:

  splitmix-0.1.0.2.tar.gz



Other differences:
--
++ ghc-splitmix.spec ++
--- /var/tmp/diff_new_pack.alLZoO/_old  2020-10-23 15:14:57.022151694 +0200
+++ /var/tmp/diff_new_pack.alLZoO/_new  2020-10-23 15:14:57.026151695 +0200
@@ -19,7 +19,7 @@
 %global pkg_name splitmix
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:0.1.0.1
+Version:0.1.0.2
 Release:0
 Summary:Fast Splittable PRNG
 License:BSD-3-Clause
@@ -28,7 +28,6 @@
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-deepseq-devel
 BuildRequires:  ghc-rpm-macros
-BuildRequires:  ghc-time-devel
 %if %{with tests}
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-async-devel

++ splitmix-0.1.0.1.tar.gz -> splitmix-0.1.0.2.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.1.0.1/Changelog.md 
new/splitmix-0.1.0.2/Changelog.md
--- old/splitmix-0.1.0.1/Changelog.md   2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.1.0.2/Changelog.md   2001-09-09 03:46:40.0 +0200
@@ -1,3 +1,13 @@
+# 0.1.0.2
+
+- Drop `time` dependency in favour of handcoded initialization
+  - On Unix platforms we use `/dev/urandom` if it exists,
+otherwise use `gettimeofday`, `clock` and `getpid`.
+  - On Windows we use `GetCurrentProcessID`, `GetCurrentThreadId()`,
+`GetTickCount`, `GetSystemTime` and `QueryPerformanceCounter`.
+  - On GHCJS use `Math.random()`
+  - Using `time` is a fallback option (e.g. for Hugs).
+
 # 0.1.0.1
 
 - Add `INLINEABLE` pragmas to `bitmaskWithRejection*` functions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.1.0.1/cbits-unix/init.c 
new/splitmix-0.1.0.2/cbits-unix/init.c
--- old/splitmix-0.1.0.1/cbits-unix/init.c  1970-01-01 01:00:00.0 
+0100
+++ new/splitmix-0.1.0.2/cbits-unix/init.c  2001-09-09 03:46:40.0 
+0200
@@ -0,0 +1,39 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+uint64_t splitmix_init() {
+
+/* if there is /dev/urandom, read from it */
+FILE *urandom = fopen("/dev/urandom", "r");
+if (urandom) {
+uint64_t result = 0;
+size_t r = fread(&result, sizeof(uint64_t), 1, urandom);
+fclose(urandom);
+
+if (r == 1) {
+return result;
+} else {
+return 0xfeed1000;
+}
+
+} else {
+/* time of day */
+struct timeval tp = {0, 0};
+gettimeofday(&tp, NULL);
+
+/* cputime */
+clock_t c = clock();
+
+/* process id */
+pid_t p = getpid();
+
+return ((uint64_t) tp.tv_sec)
+^ ((uint64_t) tp.tv_usec)
+^ ((uint64_t) c << 16)
+^ ((uint64_t) p << 32);
+}
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.1.0.1/cbits-win/init.c 
new/splitmix-0.1.0.2/cbits-win/init.c
--- old/splitmix-0.1.0.1/cbits-win/init.c   1970-01-01 01:00:00.0 
+0100
+++ new/splitmix-0.1.0.2/cbits-win/init.c   2001-09-09 03:46:40.0 
+0200
@@ -0,0 +1,28 @@
+#include 
+
+#include 
+
+uint64_t splitmix_init() {
+/* Handy list at https://stackoverflow.com/a/3487338/1308058 */
+
+uint64_t a = GetCurrentProcessId(); /* DWORD */
+uint64_t b = GetCurrentThreadId(); /* DWORD */
+uint64_t c = GetTickCount(); /* DWORD */
+
+SYSTEMTIME t = {0,0,0,0,0,0,0,0};
+GetSystemTime(&t);
+
+LARGE_INTEGER i;
+   

commit ghc-splitmix for openSUSE:Factory

2020-08-28 Thread root
Hello community,

here is the log from the commit of package ghc-splitmix for openSUSE:Factory 
checked in at 2020-08-28 21:38:29

Comparing /work/SRC/openSUSE:Factory/ghc-splitmix (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3399 (New)


Package is "ghc-splitmix"

Fri Aug 28 21:38:29 2020 rev:8 rq:829426 version:0.1.0.1

Changes:

--- /work/SRC/openSUSE:Factory/ghc-splitmix/ghc-splitmix.changes
2020-08-18 12:24:53.271818497 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3399/ghc-splitmix.changes  
2020-08-28 21:38:31.716813357 +0200
@@ -1,0 +2,5 @@
+Tue Aug 18 10:46:05 UTC 2020 - Peter Simons 
+
+- Replace %setup -q with the more modern %autosetup macro.
+
+---



Other differences:
--
++ ghc-splitmix.spec ++
--- /var/tmp/diff_new_pack.J5uFrn/_old  2020-08-28 21:38:32.264813617 +0200
+++ /var/tmp/diff_new_pack.J5uFrn/_new  2020-08-28 21:38:32.264813617 +0200
@@ -79,7 +79,7 @@
 This package provides the Haskell %{pkg_name} library development files.
 
 %prep
-%setup -q -n %{pkg_name}-%{version}
+%autosetup -n %{pkg_name}-%{version}
 
 %build
 %ghc_lib_build




commit ghc-splitmix for openSUSE:Factory

2020-08-18 Thread root
Hello community,

here is the log from the commit of package ghc-splitmix for openSUSE:Factory 
checked in at 2020-08-18 12:24:49

Comparing /work/SRC/openSUSE:Factory/ghc-splitmix (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3399 (New)


Package is "ghc-splitmix"

Tue Aug 18 12:24:49 2020 rev:7 rq:825802 version:0.1.0.1

Changes:

--- /work/SRC/openSUSE:Factory/ghc-splitmix/ghc-splitmix.changes
2020-07-09 13:20:10.381422352 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3399/ghc-splitmix.changes  
2020-08-18 12:24:53.271818497 +0200
@@ -1,0 +2,9 @@
+Fri Aug  7 02:00:26 UTC 2020 - psim...@suse.com
+
+- Update splitmix to version 0.1.0.1.
+  # 0.1.0.1
+
+  - Add `INLINEABLE` pragmas to `bitmaskWithRejection*` functions
+  - Support GHC-9.0
+
+---

Old:

  splitmix-0.1.tar.gz

New:

  splitmix-0.1.0.1.tar.gz



Other differences:
--
++ ghc-splitmix.spec ++
--- /var/tmp/diff_new_pack.KCrB7z/_old  2020-08-18 12:24:55.495819425 +0200
+++ /var/tmp/diff_new_pack.KCrB7z/_new  2020-08-18 12:24:55.495819425 +0200
@@ -19,7 +19,7 @@
 %global pkg_name splitmix
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:0.1
+Version:0.1.0.1
 Release:0
 Summary:Fast Splittable PRNG
 License:BSD-3-Clause

++ splitmix-0.1.tar.gz -> splitmix-0.1.0.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.1/Changelog.md 
new/splitmix-0.1.0.1/Changelog.md
--- old/splitmix-0.1/Changelog.md   2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.1.0.1/Changelog.md   2001-09-09 03:46:40.0 +0200
@@ -1,3 +1,8 @@
+# 0.1.0.1
+
+- Add `INLINEABLE` pragmas to `bitmaskWithRejection*` functions
+- Support GHC-9.0
+
 # 0.1
 
 - Drop `random` dependency unconditionally.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.1/splitmix.cabal 
new/splitmix-0.1.0.1/splitmix.cabal
--- old/splitmix-0.1/splitmix.cabal 2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.1.0.1/splitmix.cabal 2001-09-09 03:46:40.0 +0200
@@ -1,6 +1,6 @@
 cabal-version:  >=1.10
 name:   splitmix
-version:0.1
+version:0.1.0.1
 synopsis:   Fast Splittable PRNG
 description:
   Pure Haskell implementation of SplitMix described in
@@ -72,9 +72,9 @@
   -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html
 
   build-depends:
-  base >=4.3 && <4.15
+  base >=4.3 && <4.16
 , deepseq  >=1.3.0.0 && <1.5
-, time >=1.2.0.3 && <1.10
+, time >=1.2.0.3 && <1.11
 
   if flag(optimised-mixer)
 cpp-options: -DOPTIMISED_MIX32=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.1/src/System/Random/SplitMix.hs 
new/splitmix-0.1.0.1/src/System/Random/SplitMix.hs
--- old/splitmix-0.1/src/System/Random/SplitMix.hs  2001-09-09 
03:46:40.0 +0200
+++ new/splitmix-0.1.0.1/src/System/Random/SplitMix.hs  2001-09-09 
03:46:40.0 +0200
@@ -289,10 +289,14 @@
 
 -- | /Bitmask with rejection/ method of generating subrange of 'Word32'.
 --
+-- @bitmaskWithRejection32 w32@ generates random numbers in closed-open
+-- range of @[0, w32)@.
+--
 -- @since 0.0.3
 bitmaskWithRejection32 :: Word32 -> SMGen -> (Word32, SMGen)
 bitmaskWithRejection32 0 = error "bitmaskWithRejection32 0"
 bitmaskWithRejection32 n = bitmaskWithRejection32' (n - 1)
+{-# INLINEABLE bitmaskWithRejection32 #-}
 
 -- | /Bitmask with rejection/ method of generating subrange of 'Word64'.
 --
@@ -306,9 +310,13 @@
 bitmaskWithRejection64 :: Word64 -> SMGen -> (Word64, SMGen)
 bitmaskWithRejection64 0 = error "bitmaskWithRejection64 0"
 bitmaskWithRejection64 n = bitmaskWithRejection64' (n - 1)
+{-# INLINEABLE bitmaskWithRejection64 #-}
 
 -- | /Bitmask with rejection/ method of generating subrange of 'Word32'.
 --
+-- @bitmaskWithRejection32' w32@ generates random numbers in closed-closed
+-- range of @[0, w32]@.
+--
 -- @since 0.0.4
 bitmaskWithRejection32' :: Word32 -> SMGen -> (Word32, SMGen)
 bitmaskWithRejection32' range = go where
@@ -318,6 +326,7 @@
in if x' > range
   then go g'
   else (x', g')
+{-# INLINEABLE bitmaskWithRejection32' #-}
 
 -- | /Bitmask with rejection/ method of generating subrange of 'Word64'.
 --
@@ -336,6 +345,7 @@
in if x' > range
   then go g'
   else (x', g')
+{-# INLINEABLE bitmaskWithRejection64' #-}
 
 
 ---
diff -urN '--exclude=CVS' '--exclude=.c

commit ghc-splitmix for openSUSE:Factory

2020-07-09 Thread root
Hello community,

here is the log from the commit of package ghc-splitmix for openSUSE:Factory 
checked in at 2020-07-09 13:19:41

Comparing /work/SRC/openSUSE:Factory/ghc-splitmix (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3060 (New)


Package is "ghc-splitmix"

Thu Jul  9 13:19:41 2020 rev:6 rq:819591 version:0.1

Changes:

--- /work/SRC/openSUSE:Factory/ghc-splitmix/ghc-splitmix.changes
2020-06-19 17:18:40.295099294 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3060/ghc-splitmix.changes  
2020-07-09 13:20:10.381422352 +0200
@@ -1,0 +2,9 @@
+Tue Jul  7 11:19:12 UTC 2020 - psim...@suse.com
+
+- Update splitmix to version 0.1.
+  # 0.1
+
+  - Drop `random` dependency unconditionally.
+https://github.com/phadej/splitmix/issues/34
+
+--
@@ -37 +45,0 @@
-

Old:

  splitmix-0.0.5.tar.gz

New:

  splitmix-0.1.tar.gz



Other differences:
--
++ ghc-splitmix.spec ++
--- /var/tmp/diff_new_pack.M2U2oO/_old  2020-07-09 13:20:11.697426512 +0200
+++ /var/tmp/diff_new_pack.M2U2oO/_new  2020-07-09 13:20:11.701426524 +0200
@@ -19,7 +19,7 @@
 %global pkg_name splitmix
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:0.0.5
+Version:0.1
 Release:0
 Summary:Fast Splittable PRNG
 License:BSD-3-Clause
@@ -27,7 +27,6 @@
 Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-deepseq-devel
-BuildRequires:  ghc-random-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
 %if %{with tests}
@@ -39,6 +38,7 @@
 BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-math-functions-devel
 BuildRequires:  ghc-process-devel
+BuildRequires:  ghc-random-devel
 BuildRequires:  ghc-test-framework-devel
 BuildRequires:  ghc-test-framework-hunit-devel
 BuildRequires:  ghc-tf-random-devel

++ splitmix-0.0.5.tar.gz -> splitmix-0.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.0.5/Changelog.md 
new/splitmix-0.1/Changelog.md
--- old/splitmix-0.0.5/Changelog.md 2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.1/Changelog.md   2001-09-09 03:46:40.0 +0200
@@ -1,3 +1,8 @@
+# 0.1
+
+- Drop `random` dependency unconditionally.
+  https://github.com/phadej/splitmix/issues/34
+
 # 0.0.5
 
 - Add `nextInteger`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.0.5/bench/Bench.hs 
new/splitmix-0.1/bench/Bench.hs
--- old/splitmix-0.0.5/bench/Bench.hs   2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.1/bench/Bench.hs 2001-09-09 03:46:40.0 +0200
@@ -16,36 +16,37 @@
 ---
 
 -- infinite list
-genList :: R.RandomGen g => g -> [Int]
-genList = unfoldr (Just . R.next)
+genList :: (g -> (Int, g)) -> g -> [Int]
+genList next = unfoldr (Just . next)
 
 -- truncated
-genListN :: R.RandomGen g => g -> [Int]
-genListN = take 2048 . genList
+genListN :: (g -> (Int, g)) -> g -> [Int]
+genListN next = take 2048 . genList next
 
 randomList :: Int -> [Int]
-randomList = genListN . R.mkStdGen
+randomList = genListN R.random . R.mkStdGen
 
 tfRandomList :: Word64 -> [Int]
-tfRandomList w64 = genListN $ TF.seedTFGen (w64, w64, w64, w64)
+tfRandomList w64 = genListN R.random $ TF.seedTFGen (w64, w64, w64, w64)
 
 splitMixList :: Word64 -> [Int]
-splitMixList w64 = genListN $ SM.mkSMGen w64
+splitMixList w64 = genListN SM.nextInt $ SM.mkSMGen w64
 
 splitMix32List :: Word64 -> [Int]
-splitMix32List w64 = genListN $ SM32.mkSMGen $ fromIntegral w64
+splitMix32List w64 = genListN SM32.nextInt $ SM32.mkSMGen $ fromIntegral w64
 
 ---
 -- Tree
 ---
 
-genTree :: R.RandomGen g => g -> T.Tree Int
-genTree g = case R.next g of
-~(i, g') -> T.Node i $ case R.split g' of
-(ga, gb) -> [genTree ga, genTree gb]
+genTree :: (g -> (Int, g)) -> (g -> (g, g)) -> g -> T.Tree Int
+genTree next split = go where
+go g = case next g of
+~(i, g') -> T.Node i $ case split g' of
+(ga, gb) -> [go ga, go gb]
 
-genTreeN :: R.RandomGen g => g -> T.Tree Int
-genTreeN = cutTree 9 . genTree
+genTreeN :: (g -> (Int, g)) -> (g -> (g, g)) -> g -> T.Tree Int
+genTreeN next split = cutTree 9 . genTree next split
   where
 cutTree :: Int -> T.Tree a -> T.Tree a
 cutTree n (T.Node x forest)
@@ -53,16 +54,16 @@
 | otherwise = T.Node x (map (cutT

commit ghc-splitmix for openSUSE:Factory

2020-06-19 Thread root
Hello community,

here is the log from the commit of package ghc-splitmix for openSUSE:Factory 
checked in at 2020-06-19 17:18:34

Comparing /work/SRC/openSUSE:Factory/ghc-splitmix (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3606 (New)


Package is "ghc-splitmix"

Fri Jun 19 17:18:34 2020 rev:5 rq:815179 version:0.0.5

Changes:

--- /work/SRC/openSUSE:Factory/ghc-splitmix/ghc-splitmix.changes
2020-03-09 14:17:05.366653165 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-splitmix.new.3606/ghc-splitmix.changes  
2020-06-19 17:18:40.295099294 +0200
@@ -1,0 +2,9 @@
+Tue Jun  9 09:53:40 UTC 2020 - psim...@suse.com
+
+- Update splitmix to version 0.0.5.
+  - Add `nextInteger`
+  - Use smaller range in `bitmaskWithRejection32` and `64`, when
+upper bound is 2^n - 1. This changes generated values when they
+were on the boundary.
+
+---
@@ -5,4 +14,3 @@
-  Upstream has edited the change log file since the last release in
-  a non-trivial way, i.e. they did more than just add a new entry
-  at the top. You can review the file at:
-  http://hackage.haskell.org/package/splitmix-0.0.4/src/Changelog.md
+  - Add `bitmaskWithRejection32'` and `bitmaskWithRejection64'`
+which generate numbers in closed range `[0, n]`.
+  - Unticked variants generate in closed-open range `[0, n)`.
@@ -19,2 +26,0 @@
-  # 0.0.3
-

Old:

  splitmix-0.0.4.tar.gz

New:

  splitmix-0.0.5.tar.gz



Other differences:
--
++ ghc-splitmix.spec ++
--- /var/tmp/diff_new_pack.dk1TfH/_old  2020-06-19 17:18:41.163101574 +0200
+++ /var/tmp/diff_new_pack.dk1TfH/_new  2020-06-19 17:18:41.167101586 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-splitmix
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name splitmix
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:0.0.4
+Version:0.0.5
 Release:0
 Summary:Fast Splittable PRNG
 License:BSD-3-Clause
@@ -34,8 +34,13 @@
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-async-devel
 BuildRequires:  ghc-base-compat-batteries-devel
+BuildRequires:  ghc-base-compat-devel
 BuildRequires:  ghc-bytestring-devel
+BuildRequires:  ghc-containers-devel
+BuildRequires:  ghc-math-functions-devel
 BuildRequires:  ghc-process-devel
+BuildRequires:  ghc-test-framework-devel
+BuildRequires:  ghc-test-framework-hunit-devel
 BuildRequires:  ghc-tf-random-devel
 BuildRequires:  ghc-vector-devel
 %endif

++ splitmix-0.0.4.tar.gz -> splitmix-0.0.5.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.0.4/Changelog.md 
new/splitmix-0.0.5/Changelog.md
--- old/splitmix-0.0.4/Changelog.md 2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.0.5/Changelog.md 2001-09-09 03:46:40.0 +0200
@@ -1,4 +1,12 @@
+# 0.0.5
+
+- Add `nextInteger`
+- Use smaller range in `bitmaskWithRejection32` and `64`,
+  when upper bound is 2^n - 1.
+  This changes generated values when they were on the boundary.
+
 # 0.0.4
+
 - Add `bitmaskWithRejection32'` and `bitmaskWithRejection64'`
   which generate numbers in closed range `[0, n]`.
   Unticked variants generate in closed-open range `[0, n)`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.0.4/bench/SimpleSum.hs 
new/splitmix-0.0.5/bench/SimpleSum.hs
--- old/splitmix-0.0.4/bench/SimpleSum.hs   2001-09-09 03:46:40.0 
+0200
+++ new/splitmix-0.0.5/bench/SimpleSum.hs   2001-09-09 03:46:40.0 
+0200
@@ -24,6 +24,9 @@
 "splitmix32" : _ -> newGen 33 SM32.mkSMGen SM32.newSMGen >>= \g -> 
print $ benchSum g SM32.nextTwoWord32
 "random" : _ -> R.newStdGen   >>= \g -> print $ benchSum g 
randomNextTwoWord32
 
+"sm-integer" : _ -> SM.newSMGen >>= \g -> print $ benchSumInteger g 
(SM.nextInteger two64 (two64 * 5))
+"r-integer"  : _ -> R.newStdGen >>= \g -> print $ benchSumInteger g 
(R.randomR (two64, two64 * 5))
+
 -- after Closure Compiler getArgs return [] always?
 -- _ -> newGen 33 SM.mkSMGen   SM.newSMGen   >>= \g -> print $ 
benchSum g SM.nextTwoWord32
 _ -> newGen 33 SM32.mkSMGen SM32.newSMGen >>= \g -> print $ benchSum g 
SM32.nextTwoWord32
@@ -32,12 +35,23 @@
 benchSum :: g -> (g -> (Word32, Word32, g)) -> Word32
 benchSum g next = foldl' (+) 0 $ take 1000 $ unfoldr2 next g
 
+benchSumInteger :: g -> (g -> (Integer, g)) -> Integer
+benchSumInteger g next = 

commit ghc-splitmix for openSUSE:Factory

2020-03-09 Thread root
Hello community,

here is the log from the commit of package ghc-splitmix for openSUSE:Factory 
checked in at 2020-03-09 14:16:58

Comparing /work/SRC/openSUSE:Factory/ghc-splitmix (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-splitmix.new.26092 (New)


Package is "ghc-splitmix"

Mon Mar  9 14:16:58 2020 rev:4 rq:780036 version:0.0.4

Changes:

--- /work/SRC/openSUSE:Factory/ghc-splitmix/ghc-splitmix.changes
2019-12-27 13:57:41.432783608 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-splitmix.new.26092/ghc-splitmix.changes 
2020-03-09 14:17:05.366653165 +0100
@@ -1,0 +2,9 @@
+Thu Feb 27 14:17:58 UTC 2020 - psim...@suse.com
+
+- Update splitmix to version 0.0.4.
+  Upstream has edited the change log file since the last release in
+  a non-trivial way, i.e. they did more than just add a new entry
+  at the top. You can review the file at:
+  http://hackage.haskell.org/package/splitmix-0.0.4/src/Changelog.md
+
+---

Old:

  splitmix-0.0.3.tar.gz

New:

  splitmix-0.0.4.tar.gz



Other differences:
--
++ ghc-splitmix.spec ++
--- /var/tmp/diff_new_pack.P9wsYT/_old  2020-03-09 14:17:06.026653600 +0100
+++ /var/tmp/diff_new_pack.P9wsYT/_new  2020-03-09 14:17:06.030653602 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-splitmix
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name splitmix
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:0.0.3
+Version:0.0.4
 Release:0
 Summary:Fast Splittable PRNG
 License:BSD-3-Clause

++ splitmix-0.0.3.tar.gz -> splitmix-0.0.4.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.0.3/Changelog.md 
new/splitmix-0.0.4/Changelog.md
--- old/splitmix-0.0.3/Changelog.md 2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.0.4/Changelog.md 2001-09-09 03:46:40.0 +0200
@@ -1,7 +1,12 @@
+# 0.0.4
+- Add `bitmaskWithRejection32'` and `bitmaskWithRejection64'`
+  which generate numbers in closed range `[0, n]`.
+  Unticked variants generate in closed-open range `[0, n)`.
+
 # 0.0.3
 
 - Add `System.Random.SplitMix32` module
-- Add `bitmaskWithRejection32` and `bitmaskWithRejection64` module
+- Add `bitmaskWithRejection32` and `bitmaskWithRejection64` functions
 - Add `nextWord32`, `nextTwoWord32` and `nextFloat`
 - Add `random` flag, dropping dependency on `random`
   (breaks things, e.g. `QuickCheck`, when disabled).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.0.3/splitmix.cabal 
new/splitmix-0.0.4/splitmix.cabal
--- old/splitmix-0.0.3/splitmix.cabal   2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.0.4/splitmix.cabal   2001-09-09 03:46:40.0 +0200
@@ -1,6 +1,6 @@
 cabal-version:  >=1.10
 name:   splitmix
-version:0.0.3
+version:0.0.4
 synopsis:   Fast Splittable PRNG
 description:
   Pure Haskell implementation of SplitMix described in
@@ -33,7 +33,19 @@
 category:   System, Random
 build-type: Simple
 tested-with:
-  GHC ==8.8.1 || ==8.6.5 || ==8.4.4 || ==8.2.2 || ==8.0.2 || ==7.10.3 || 
==7.8.4 || ==7.6.3 || ==7.4.2 || ==7.2.2 || ==7.0.4
+GHC ==7.0.4
+ || ==7.2.2
+ || ==7.4.2
+ || ==7.6.3
+ || ==7.8.4
+ || ==7.10.3
+ || ==8.0.2
+ || ==8.2.2
+ || ==8.4.4
+ || ==8.6.5
+ || ==8.8.2
+ || ==8.10.1
+  , GHCJS ==8.4
 
 extra-source-files:
   README.md
@@ -63,7 +75,7 @@
   -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html
 
   build-depends:
-  base >=4.3 && <4.14
+  base >=4.3 && <4.15
 , deepseq  >=1.3.0.0 && <1.5
 , time >=1.2.0.3 && <1.10
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.0.3/src/System/Random/SplitMix.hs 
new/splitmix-0.0.4/src/System/Random/SplitMix.hs
--- old/splitmix-0.0.3/src/System/Random/SplitMix.hs2001-09-09 
03:46:40.0 +0200
+++ new/splitmix-0.0.4/src/System/Random/SplitMix.hs2001-09-09 
03:46:40.0 +0200
@@ -26,9 +26,9 @@
 --  but GHC-7.0 and GHC-7.2 have slow implementation, as there
 --  are no native 'popCount'.
 --
-{-# LANGUAGE CPP  #-}
+{-# LANGUAGE CPP #-}
 #if __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy  #-}
+{-# LANGUAGE Trustworthy #-}
 #endif
 module System.Random.SplitMix (
 SMGen,
@@ -41,7 +41,9

commit ghc-splitmix for openSUSE:Factory

2019-12-27 Thread root
Hello community,

here is the log from the commit of package ghc-splitmix for openSUSE:Factory 
checked in at 2019-12-27 13:57:36

Comparing /work/SRC/openSUSE:Factory/ghc-splitmix (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-splitmix.new.6675 (New)


Package is "ghc-splitmix"

Fri Dec 27 13:57:36 2019 rev:3 rq:759514 version:0.0.3

Changes:

--- /work/SRC/openSUSE:Factory/ghc-splitmix/ghc-splitmix.changes
2019-08-13 13:15:31.929501982 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-splitmix.new.6675/ghc-splitmix.changes  
2019-12-27 13:57:41.432783608 +0100
@@ -1,0 +2,5 @@
+Fri Nov  8 16:14:48 UTC 2019 - Peter Simons 
+
+- Drop obsolete group attributes.
+
+---



Other differences:
--
++ ghc-splitmix.spec ++
--- /var/tmp/diff_new_pack.LT86oy/_old  2019-12-27 13:57:42.212783985 +0100
+++ /var/tmp/diff_new_pack.LT86oy/_new  2019-12-27 13:57:42.216783987 +0100
@@ -23,7 +23,6 @@
 Release:0
 Summary:Fast Splittable PRNG
 License:BSD-3-Clause
-Group:  Development/Libraries/Haskell
 URL:https://hackage.haskell.org/package/%{pkg_name}
 Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
@@ -66,7 +65,6 @@
 
 %package devel
 Summary:Haskell %{pkg_name} library development files
-Group:  Development/Libraries/Haskell
 Requires:   %{name} = %{version}-%{release}
 Requires:   ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}




commit ghc-splitmix for openSUSE:Factory

2019-08-13 Thread root
Hello community,

here is the log from the commit of package ghc-splitmix for openSUSE:Factory 
checked in at 2019-08-13 13:15:29

Comparing /work/SRC/openSUSE:Factory/ghc-splitmix (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-splitmix.new.9556 (New)


Package is "ghc-splitmix"

Tue Aug 13 13:15:29 2019 rev:2 rq:721037 version:0.0.3

Changes:

--- /work/SRC/openSUSE:Factory/ghc-splitmix/ghc-splitmix.changes
2019-04-03 09:27:33.151802167 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-splitmix.new.9556/ghc-splitmix.changes  
2019-08-13 13:15:31.929501982 +0200
@@ -1,0 +2,12 @@
+Wed Jul 31 02:03:22 UTC 2019 - psim...@suse.com
+
+- Update splitmix to version 0.0.3.
+  # 0.0.3
+
+  - Add `System.Random.SplitMix32` module
+  - Add `bitmaskWithRejection32` and `bitmaskWithRejection64` module
+  - Add `nextWord32`, `nextTwoWord32` and `nextFloat`
+  - Add `random` flag, dropping dependency on `random`
+(breaks things, e.g. `QuickCheck`, when disabled).
+
+---

Old:

  splitmix-0.0.2.tar.gz

New:

  splitmix-0.0.3.tar.gz



Other differences:
--
++ ghc-splitmix.spec ++
--- /var/tmp/diff_new_pack.4T9tgC/_old  2019-08-13 13:15:33.429501635 +0200
+++ /var/tmp/diff_new_pack.4T9tgC/_new  2019-08-13 13:15:33.445501631 +0200
@@ -19,7 +19,7 @@
 %global pkg_name splitmix
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:0.0.2
+Version:0.0.3
 Release:0
 Summary:Fast Splittable PRNG
 License:BSD-3-Clause
@@ -32,6 +32,7 @@
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
 %if %{with tests}
+BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-async-devel
 BuildRequires:  ghc-base-compat-batteries-devel
 BuildRequires:  ghc-bytestring-devel

++ splitmix-0.0.2.tar.gz -> splitmix-0.0.3.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.0.2/Changelog.md 
new/splitmix-0.0.3/Changelog.md
--- old/splitmix-0.0.2/Changelog.md 2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.0.3/Changelog.md 2001-09-09 03:46:40.0 +0200
@@ -1,3 +1,11 @@
+# 0.0.3
+
+- Add `System.Random.SplitMix32` module
+- Add `bitmaskWithRejection32` and `bitmaskWithRejection64` module
+- Add `nextWord32`, `nextTwoWord32` and `nextFloat`
+- Add `random` flag, dropping dependency on `random`
+  (breaks things, e.g. `QuickCheck`, when disabled).
+
 # 0.0.2
 
 - Support back to GHC-7.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splitmix-0.0.2/bench/Bench.hs 
new/splitmix-0.0.3/bench/Bench.hs
--- old/splitmix-0.0.2/bench/Bench.hs   2001-09-09 03:46:40.0 +0200
+++ new/splitmix-0.0.3/bench/Bench.hs   2001-09-09 03:46:40.0 +0200
@@ -9,6 +9,7 @@
 import qualified System.Random.TF as TF
 import qualified System.Random.TF.Instances as TF
 import qualified System.Random.SplitMix as SM
+import qualified System.Random.SplitMix32 as SM32
 
 ---
 -- List
@@ -31,6 +32,9 @@
 splitMixList :: Word64 -> [Int]
 splitMixList w64 = genListN $ SM.mkSMGen w64
 
+splitMix32List :: Word64 -> [Int]
+splitMix32List w64 = genListN $ SM32.mkSMGen $ fromIntegral w64
+
 ---
 -- Tree
 ---
@@ -57,6 +61,9 @@
 splitMixTree :: Word64 -> T.Tree Int
 splitMixTree w64 = genTreeN $ SM.mkSMGen w64
 
+splitMix32Tree :: Word64 -> T.Tree Int
+splitMix32Tree w64 = genTreeN $ SM32.mkSMGen $ fromIntegral w64
+
 ---
 -- List Word64
 ---
@@ -78,6 +85,9 @@
 splitMixList64 :: Word64 -> [Word64]
 splitMixList64 w64 = genListN64 SM.nextWord64 $ SM.mkSMGen w64
 
+splitMix32List64 :: Word64 -> [Word64]
+splitMix32List64 w64 = genListN64 SM32.nextWord64 $ SM32.mkSMGen $ 
fromIntegral w64
+
 ---
 -- Tree Word64
 ---
@@ -105,6 +115,9 @@
 splitMixTree64 :: Word64 -> T.Tree Word64
 splitMixTree64 w64 = genTreeN64 SM.nextWord64 $ SM.mkSMGen w64
 
+splitMix32Tree64 :: Word64 -> T.Tree Word64
+splitMix32Tree64 w64 = genTreeN64 SM32.nextWord64 $ SM32.mkSMGen $ 
fromIntegral w64
+
 ---
 -- Main
 ---
@@ -112,23 +125