packages feed

splitmix 0.1.0.5 → 0.1.1

raw patch · 7 files changed

+29/−89 lines, 7 filesdep −base-compatdep −clockdep ~HUnitdep ~basedep ~base-compat-batteries

Dependencies removed: base-compat, clock

Dependency ranges changed: HUnit, base, base-compat-batteries, bytestring, containers, criterion, deepseq, math-functions, process, time, vector

Files

Changelog.md view
@@ -1,3 +1,8 @@+# 0.1.1++- Drop support for GHCs prior 8.6.5+- Support GHC-9.12+ # 0.1.0.4  - Add TestU01 test-suite
splitmix.cabal view
@@ -1,6 +1,6 @@ cabal-version:      >=1.10 name:               splitmix-version:            0.1.0.5+version:            0.1.1 synopsis:           Fast Splittable PRNG description:   Pure Haskell implementation of SplitMix described in@@ -33,24 +33,16 @@ category:           System, Random build-type:         Simple tested-with:-    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+    GHC ==8.6.5      || ==8.8.4      || ==8.10.4      || ==9.0.2      || ==9.2.8-     || ==9.4.7-     || ==9.6.3-     || ==9.8.1-  , GHCJS ==8.4+     || ==9.4.8+     || ==9.6.6+     || ==9.8.4+     || ==9.10.1+     || ==9.11.1  extra-source-files:   Changelog.md@@ -80,8 +72,8 @@   -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html    build-depends:-      base     >=4.3     && <4.20-    , deepseq  >=1.3.0.0 && <1.6+      base     >=4.12.0.0 && <4.22+    , deepseq  >=1.4.4.0  && <1.6    if flag(optimised-mixer)     cpp-options: -DOPTIMISED_MIX32=1@@ -105,7 +97,7 @@      else       cpp-options:   -DSPLITMIX_INIT_COMPAT=1-      build-depends: time >=1.2.0.3 && <1.13+      build-depends: time >=1.2.0.3 && <1.15  source-repository head   type:     git@@ -119,8 +111,8 @@   main-is:          Bench.hs   build-depends:       base-    , containers  >=0.4.2.1 && <0.7-    , criterion   >=1.1.0.0 && <1.7+    , containers  >=0.6.0.1 && <0.8+    , criterion   >=1.6.0.0 && <1.7     , random     , splitmix     , tf-random   >=0.5     && <0.6@@ -148,9 +140,6 @@     , random     , splitmix -  if !impl(ghcjs)-    build-depends: clock >=0.8 && <0.9- test-suite examples   type:             exitcode-stdio-1.0   default-language: Haskell2010@@ -159,7 +148,7 @@   main-is:          Examples.hs   build-depends:       base-    , HUnit     ==1.3.1.2 || >=1.6.0.0 && <1.7+    , HUnit     >=1.6.0.0 && <1.7     , splitmix  test-suite splitmix-tests@@ -174,10 +163,9 @@    build-depends:       base-    , base-compat           >=0.11.1  && <0.14-    , containers            >=0.4.0.0 && <0.7-    , HUnit                 ==1.3.1.2 || >=1.6.0.0 && <1.7-    , math-functions        ==0.1.7.0 || >=0.3.3.0 && <0.4+    , containers            >=0.4.0.0 && <0.8+    , HUnit                 >=1.6.0.0 && <1.7+    , math-functions        >=0.3.3.0 && <0.4     , splitmix     , test-framework        >=0.8.2.0 && <0.9     , test-framework-hunit  >=0.3.0.2 && <0.4@@ -211,14 +199,13 @@   build-depends:       async                  >=2.2.1    && <2.3     , base-    , base-compat-batteries  >=0.10.5   && <0.14-    , bytestring             >=0.9.1.8  && <0.13+    , bytestring             >=0.10.8.2  && <0.13     , deepseq-    , process                >=1.0.1.5  && <1.7+    , process                >=1.6.0.0  && <1.7     , random     , splitmix     , tf-random              >=0.5      && <0.6-    , vector                 >=0.11.0.0 && <0.14+    , vector                 >=0.13.0.0 && <0.14  test-suite splitmix-testu01   if !os(linux)@@ -233,7 +220,7 @@   extra-libraries:  testu01   build-depends:       base-    , base-compat-batteries  >=0.10.5 && <0.14+    , base-compat-batteries  >=0.10.5 && <0.15     , splitmix  test-suite initialization@@ -244,5 +231,5 @@   main-is:          Initialization.hs   build-depends:       base-    , HUnit     ==1.3.1.2 || >=1.6.0.0 && <1.7+    , HUnit     >=1.6.0.0 && <1.7     , splitmix
src-compat/Data/Bits/Compat.hs view
@@ -6,39 +6,4 @@     countLeadingZeros,     ) where -import Data.Bits--#if !MIN_VERSION_base(4,7,0)-#define FiniteBits Bits-#endif--#if !MIN_VERSION_base(4,5,0)-popCount :: Bits a => a -> Int-popCount = go 0- where-   go c 0 = c `seq` c-   go c w = go (c+1) (w .&. (w - 1)) -- clear the least significant-{-# INLINE popCount #-}-#endif--#if !MIN_VERSION_base(4,7,0)-zeroBits :: Bits a => a-zeroBits = clearBit (bit 0) 0-{-# INLINE zeroBits #-}--finiteBitSize :: Bits a => a -> Int-finiteBitSize = bitSize-{-# INLINE finiteBitSize #-}-#endif--#if !MIN_VERSION_base(4,8,0)-countLeadingZeros :: FiniteBits b => b -> Int-countLeadingZeros x = (w-1) - go (w-1)-  where-    go i | i < 0       = i -- no bit set-         | testBit x i = i-         | otherwise   = go (i-1)--    w = finiteBitSize x-{-# INLINE countLeadingZeros #-}-#endif+import Data.Bits (popCount, zeroBits, finiteBitSize, countLeadingZeros)
src/System/Random/SplitMix.hs view
@@ -22,14 +22,8 @@ --  (the mixing functions are easily inverted, and two successive outputs --  suffice to reconstruct the internal state). -----  Note: This module supports all GHCs since GHC-7.0.4,---  but GHC-7.0 and GHC-7.2 have slow implementation, as there---  are no native 'popCount'.--- {-# LANGUAGE CPP          #-}-#if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy  #-}-#endif module System.Random.SplitMix (     SMGen,     nextWord64,@@ -62,7 +56,7 @@  import System.Random.SplitMix.Init -#if defined(__HUGS__) || !MIN_VERSION_base(4,8,0)+#if defined(__HUGS__) import Data.Word (Word) #endif 
src/System/Random/SplitMix32.hs view
@@ -5,14 +5,8 @@ -- -- You __really don't want to use this one__. -----  Note: This module supports all GHCs since GHC-7.0.4,---  but GHC-7.0 and GHC-7.2 have slow implementation, as there---  are no native 'popCount'.--- {-# LANGUAGE CPP         #-}-#if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-}-#endif module System.Random.SplitMix32 (     SMGen,     nextWord32,@@ -46,7 +40,7 @@  import System.Random.SplitMix.Init -#if defined(__HUGS__) || !MIN_VERSION_base(4,8,0)+#if defined(__HUGS__) import Data.Word (Word) #endif 
tests/Dieharder.hs view
@@ -3,9 +3,6 @@ {-# LANGUAGE ScopedTypeVariables #-} module Main (main) where -import Prelude ()-import Prelude.Compat- import Control.Concurrent.QSem import Control.DeepSeq         (force) import Control.Monad           (when)
tests/MiniQC.hs view
@@ -5,8 +5,6 @@ import Control.Monad                  (ap) import Data.Int                       (Int32, Int64) import Data.Word                      (Word32, Word64)-import Prelude ()-import Prelude.Compat import Test.Framework.Providers.API   (Test, TestName) import Test.Framework.Providers.HUnit (testCase) import Test.HUnit                     (assertFailure)