diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index b019d6b..27a0542 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -124,7 +124,7 @@ jobs: HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" - echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" + echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" echo "HEADHACKAGE=false" >> "$GITHUB_ENV" echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" env: @@ -192,6 +192,7 @@ jobs: run: | touch cabal.project echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project + echo "packages: $GITHUB_WORKSPACE/source/splitmix-tests" >> cabal.project cat cabal.project - name: sdist run: | @@ -205,19 +206,28 @@ jobs: run: | PKGDIR_splitmix="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/splitmix-[0-9.]*')" echo "PKGDIR_splitmix=${PKGDIR_splitmix}" >> "$GITHUB_ENV" + PKGDIR_splitmix_tests="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/splitmix-tests-[0-9.]*')" + echo "PKGDIR_splitmix_tests=${PKGDIR_splitmix_tests}" >> "$GITHUB_ENV" rm -f cabal.project cabal.project.local touch cabal.project touch cabal.project.local echo "packages: ${PKGDIR_splitmix}" >> cabal.project + echo "packages: ${PKGDIR_splitmix_tests}" >> cabal.project echo "package splitmix" >> cabal.project echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project + echo "package splitmix-tests" >> cabal.project + echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package splitmix" >> cabal.project ; fi if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package splitmix-tests" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package splitmix" >> cabal.project ; fi if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package splitmix-tests" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi cat >> cabal.project <> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(splitmix|splitmix-tests)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -230,10 +240,6 @@ jobs: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- - - name: install dependencies - run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all - name: build w/o tests run: | $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all @@ -251,6 +257,8 @@ jobs: run: | cd ${PKGDIR_splitmix} || false ${CABAL} -vnormal check + cd ${PKGDIR_splitmix_tests} || false + ${CABAL} -vnormal check - name: haddock run: | $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all @@ -265,34 +273,29 @@ jobs: run: | $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.12' all --dry-run cabal-plan topo | sort - $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.12' --dependencies-only -j2 all $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.12' all $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.12' all - name: constraint set bytestring-0.11 run: | if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.11' all --dry-run ; fi if [ $((HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi - if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.11' --dependencies-only -j2 all ; fi if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.11' all ; fi if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.11' all ; fi - name: constraint set time-1.12 run: | if [ $((HCNUMVER >= 80800 && HCNUMVER < 91200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='time ^>=1.12' all --dry-run ; fi if [ $((HCNUMVER >= 80800 && HCNUMVER < 91200)) -ne 0 ] ; then cabal-plan topo | sort ; fi - if [ $((HCNUMVER >= 80800 && HCNUMVER < 91200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='time ^>=1.12' --dependencies-only -j2 all ; fi if [ $((HCNUMVER >= 80800 && HCNUMVER < 91200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='time ^>=1.12' all ; fi if [ $((HCNUMVER >= 80800 && HCNUMVER < 91200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='time ^>=1.12' all ; fi - name: constraint set time-1.11 run: | if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.11' all --dry-run ; fi if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cabal-plan topo | sort ; fi - if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.11' --dependencies-only -j2 all ; fi if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.11' all ; fi - name: constraint set time-1.10 run: | if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.10' all --dry-run ; fi if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cabal-plan topo | sort ; fi - if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.10' --dependencies-only -j2 all ; fi if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.10' all ; fi - name: save cache if: always() diff --git a/cabal.haskell-ci b/cabal.haskell-ci index 8f630f9..74a131c 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -1,6 +1,6 @@ branches: master docspec: True -benchmarks: False +install-dependencies: False apt: hugs libhugs-time-bundled libtestu01-0-dev head-hackage: False diff --git a/cabal.project b/cabal.project index 0f166c7..3fef75e 100644 --- a/cabal.project +++ b/cabal.project @@ -1,3 +1,5 @@ packages: . +packages: splitmix-tests tests: True +benchmarks: True diff --git a/splitmix-tests/LICENSE b/splitmix-tests/LICENSE new file mode 100644 index 0000000..96445e5 --- /dev/null +++ b/splitmix-tests/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2017, Oleg Grenrus + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Oleg Grenrus nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/bench/Bench.hs b/splitmix-tests/bench/Bench.hs similarity index 100% rename from bench/Bench.hs rename to splitmix-tests/bench/Bench.hs diff --git a/bench/Range.hs b/splitmix-tests/bench/Range.hs similarity index 99% rename from bench/Range.hs rename to splitmix-tests/bench/Range.hs index 9f9f034..bda9473 100644 --- a/bench/Range.hs +++ b/splitmix-tests/bench/Range.hs @@ -4,7 +4,6 @@ module Main where import Data.Bits -import Data.Bits.Compat import Data.List (unfoldr) import Data.Word (Word32, Word64) diff --git a/bench/SimpleSum.hs b/splitmix-tests/bench/SimpleSum.hs similarity index 100% rename from bench/SimpleSum.hs rename to splitmix-tests/bench/SimpleSum.hs diff --git a/splitmix-tests/splitmix-tests.cabal b/splitmix-tests/splitmix-tests.cabal new file mode 100644 index 0000000..9934b2f --- /dev/null +++ b/splitmix-tests/splitmix-tests.cabal @@ -0,0 +1,152 @@ +cabal-version: 2.4 +name: splitmix-tests +version: 0 +synopsis: Fast Splittable PRNG +description: + Pure Haskell implementation of SplitMix described in ... + more tests + +license: BSD-3-Clause +license-file: LICENSE +maintainer: Oleg Grenrus +bug-reports: https://github.com/haskellari/splitmix/issues +category: System, Random +build-type: Simple +tested-with: + GHC ==8.6.5 + || ==8.8.4 + || ==8.10.4 + || ==9.0.2 + || ==9.2.8 + || ==9.4.8 + || ==9.6.7 + || ==9.8.4 + || ==9.10.2 + || ==9.12.2 + +library + default-language: Haskell2010 + hs-source-dirs: src + exposed-modules: Dummy + build-depends: base <5 + +source-repository head + type: git + location: https://github.com/haskellari/splitmix.git + +benchmark comparison + type: exitcode-stdio-1.0 + default-language: Haskell2010 + ghc-options: -Wall + hs-source-dirs: bench + main-is: Bench.hs + build-depends: + , base <5 + , containers >=0.6.0.1 && <0.8 + , criterion >=1.6.0.0 && <1.7 + , random + , splitmix + , tf-random >=0.5 && <0.6 + +benchmark simple-sum + type: exitcode-stdio-1.0 + default-language: Haskell2010 + ghc-options: -Wall + hs-source-dirs: bench + main-is: SimpleSum.hs + build-depends: + , base <5 + , random + , splitmix + +benchmark range + type: exitcode-stdio-1.0 + default-language: Haskell2010 + ghc-options: -Wall + hs-source-dirs: bench + main-is: Range.hs + build-depends: + , base <5 + , clock >=0.8.4 && <0.9 + , splitmix + +test-suite splitmix-tests + type: exitcode-stdio-1.0 + default-language: Haskell2010 + ghc-options: -Wall + hs-source-dirs: tests + main-is: splitmix-tests.hs + other-modules: + MiniQC + Uniformity + + build-depends: + , base <5 + , 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 + +test-suite montecarlo-pi + type: exitcode-stdio-1.0 + default-language: Haskell2010 + ghc-options: -Wall + hs-source-dirs: tests + main-is: SplitMixPi.hs + build-depends: + , base <5 + , splitmix + +test-suite montecarlo-pi-32 + type: exitcode-stdio-1.0 + default-language: Haskell2010 + ghc-options: -Wall + hs-source-dirs: tests + main-is: SplitMixPi32.hs + build-depends: + , base <5 + , splitmix + +test-suite splitmix-dieharder + default-language: Haskell2010 + type: exitcode-stdio-1.0 + ghc-options: -Wall -threaded -rtsopts + hs-source-dirs: tests + main-is: Dieharder.hs + build-depends: + , async >=2.2.1 && <2.3 + , base <5 + , bytestring >=0.10.8.2 && <0.13 + , deepseq + , process >=1.6.0.0 && <1.7 + , splitmix + , tf-random >=0.5 && <0.6 + , vector >=0.13.2.0 && <0.14 + +test-suite splitmix-testu01 + if !os(linux) + buildable: False + + default-language: Haskell2010 + type: exitcode-stdio-1.0 + ghc-options: -Wall -threaded -rtsopts + hs-source-dirs: tests + main-is: TestU01.hs + c-sources: tests/cbits/testu01.c + extra-libraries: testu01 + build-depends: + , base <5 + , splitmix + +test-suite initialization + default-language: Haskell2010 + type: exitcode-stdio-1.0 + ghc-options: -Wall -threaded -rtsopts + hs-source-dirs: tests + main-is: Initialization.hs + build-depends: + , base <5 + , HUnit >=1.6.0.0 && <1.7 + , splitmix diff --git a/splitmix-tests/src/Dummy.hs b/splitmix-tests/src/Dummy.hs new file mode 100644 index 0000000..d76e30b --- /dev/null +++ b/splitmix-tests/src/Dummy.hs @@ -0,0 +1 @@ +module Dummy () where diff --git a/tests/Dieharder.hs b/splitmix-tests/tests/Dieharder.hs similarity index 100% rename from tests/Dieharder.hs rename to splitmix-tests/tests/Dieharder.hs diff --git a/tests/Initialization.hs b/splitmix-tests/tests/Initialization.hs similarity index 100% rename from tests/Initialization.hs rename to splitmix-tests/tests/Initialization.hs diff --git a/tests/MiniQC.hs b/splitmix-tests/tests/MiniQC.hs similarity index 100% rename from tests/MiniQC.hs rename to splitmix-tests/tests/MiniQC.hs diff --git a/tests/SplitMixPi.hs b/splitmix-tests/tests/SplitMixPi.hs similarity index 100% rename from tests/SplitMixPi.hs rename to splitmix-tests/tests/SplitMixPi.hs diff --git a/tests/SplitMixPi32.hs b/splitmix-tests/tests/SplitMixPi32.hs similarity index 100% rename from tests/SplitMixPi32.hs rename to splitmix-tests/tests/SplitMixPi32.hs diff --git a/tests/TestU01.hs b/splitmix-tests/tests/TestU01.hs similarity index 99% rename from tests/TestU01.hs rename to splitmix-tests/tests/TestU01.hs index 9e57533..72a0532 100644 --- a/tests/TestU01.hs +++ b/splitmix-tests/tests/TestU01.hs @@ -3,9 +3,6 @@ {-# LANGUAGE ScopedTypeVariables #-} module Main (main) where -import Prelude () -import Prelude.Compat - import Data.Char (isSpace) import Data.IORef (IORef, newIORef, readIORef, writeIORef) import Data.Maybe (fromMaybe) diff --git a/tests/Uniformity.hs b/splitmix-tests/tests/Uniformity.hs similarity index 100% rename from tests/Uniformity.hs rename to splitmix-tests/tests/Uniformity.hs diff --git a/tests/cbits/testu01.c b/splitmix-tests/tests/cbits/testu01.c similarity index 100% rename from tests/cbits/testu01.c rename to splitmix-tests/tests/cbits/testu01.c diff --git a/tests/Tests.hs b/splitmix-tests/tests/splitmix-tests.hs similarity index 100% rename from tests/Tests.hs rename to splitmix-tests/tests/splitmix-tests.hs diff --git a/splitmix.cabal b/splitmix.cabal index 6c198b4..6aac977 100644 --- a/splitmix.cabal +++ b/splitmix.cabal @@ -60,13 +60,12 @@ flag optimised-mixer library default-language: Haskell2010 ghc-options: -Wall - hs-source-dirs: src src-compat + hs-source-dirs: src exposed-modules: System.Random.SplitMix System.Random.SplitMix32 other-modules: - Data.Bits.Compat System.Random.SplitMix.Init -- dump-core @@ -109,131 +108,12 @@ source-repository head type: git location: https://github.com/haskellari/splitmix.git -benchmark comparison +test-suite splitmix-examples type: exitcode-stdio-1.0 default-language: Haskell2010 ghc-options: -Wall - hs-source-dirs: bench - main-is: Bench.hs - build-depends: - , base - , containers >=0.6.0.1 && <0.8 - , criterion >=1.6.0.0 && <1.7 - , random - , splitmix - , tf-random >=0.5 && <0.6 - -benchmark simple-sum - type: exitcode-stdio-1.0 - default-language: Haskell2010 - ghc-options: -Wall - hs-source-dirs: bench - main-is: SimpleSum.hs - build-depends: - , base - , random - , splitmix - -benchmark range - type: exitcode-stdio-1.0 - default-language: Haskell2010 - ghc-options: -Wall - hs-source-dirs: bench src-compat - main-is: Range.hs - other-modules: Data.Bits.Compat - build-depends: - , base - , random - , splitmix - -test-suite examples - type: exitcode-stdio-1.0 - default-language: Haskell2010 - ghc-options: -Wall - hs-source-dirs: tests - main-is: Examples.hs - build-depends: - , base - , HUnit >=1.6.0.0 && <1.7 - , splitmix - -test-suite splitmix-tests - type: exitcode-stdio-1.0 - default-language: Haskell2010 - ghc-options: -Wall - hs-source-dirs: tests - main-is: Tests.hs - other-modules: - MiniQC - Uniformity - - build-depends: - , base - , 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 - -test-suite montecarlo-pi - type: exitcode-stdio-1.0 - default-language: Haskell2010 - ghc-options: -Wall - hs-source-dirs: tests - main-is: SplitMixPi.hs - build-depends: - , base - , splitmix - -test-suite montecarlo-pi-32 - type: exitcode-stdio-1.0 - default-language: Haskell2010 - ghc-options: -Wall - hs-source-dirs: tests - main-is: SplitMixPi32.hs - build-depends: - , base - , splitmix - -test-suite splitmix-dieharder - default-language: Haskell2010 - type: exitcode-stdio-1.0 - ghc-options: -Wall -threaded -rtsopts - hs-source-dirs: tests - main-is: Dieharder.hs - build-depends: - , async >=2.2.1 && <2.3 - , base - , bytestring >=0.10.8.2 && <0.13 - , deepseq - , process >=1.6.0.0 && <1.7 - , splitmix - , tf-random >=0.5 && <0.6 - , vector >=0.13.0.0 && <0.14 - -test-suite splitmix-testu01 - if !os(linux) - buildable: False - - default-language: Haskell2010 - type: exitcode-stdio-1.0 - ghc-options: -Wall -threaded -rtsopts - hs-source-dirs: tests - main-is: TestU01.hs - c-sources: tests/cbits/testu01.c - extra-libraries: testu01 - build-depends: - , base - , base-compat-batteries >=0.10.5 && <0.15 - , splitmix - -test-suite initialization - default-language: Haskell2010 - type: exitcode-stdio-1.0 - ghc-options: -Wall -threaded -rtsopts hs-source-dirs: tests - main-is: Initialization.hs + main-is: splitmix-examples.hs build-depends: , base , HUnit >=1.6.0.0 && <1.7 diff --git a/src-compat/Data/Bits/Compat.hs b/src-compat/Data/Bits/Compat.hs deleted file mode 100644 index d532f64..0000000 --- a/src-compat/Data/Bits/Compat.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE CPP #-} -module Data.Bits.Compat ( - popCount, - zeroBits, - finiteBitSize, - countLeadingZeros, - ) where - -import Data.Bits (popCount, zeroBits, finiteBitSize, countLeadingZeros) diff --git a/src/System/Random/SplitMix.hs b/src/System/Random/SplitMix.hs index 969ce81..e724c66 100644 --- a/src/System/Random/SplitMix.hs +++ b/src/System/Random/SplitMix.hs @@ -49,7 +49,7 @@ module System.Random.SplitMix ( ) where import Data.Bits (complement, shiftL, shiftR, xor, (.&.), (.|.)) -import Data.Bits.Compat (countLeadingZeros, popCount, zeroBits) +import Data.Bits (countLeadingZeros, popCount, zeroBits) import Data.IORef (IORef, atomicModifyIORef, newIORef) import Data.Word (Word32, Word64) import System.IO.Unsafe (unsafePerformIO) diff --git a/src/System/Random/SplitMix32.hs b/src/System/Random/SplitMix32.hs index 33a9978..1d54267 100644 --- a/src/System/Random/SplitMix32.hs +++ b/src/System/Random/SplitMix32.hs @@ -32,7 +32,7 @@ module System.Random.SplitMix32 ( ) where import Data.Bits (complement, shiftL, shiftR, xor, (.&.), (.|.)) -import Data.Bits.Compat +import Data.Bits (countLeadingZeros, finiteBitSize, popCount, zeroBits) import Data.IORef (IORef, atomicModifyIORef, newIORef) import Data.Word (Word32, Word64) diff --git a/tests/Examples.hs b/tests/splitmix-examples.hs similarity index 100% rename from tests/Examples.hs rename to tests/splitmix-examples.hs