diff --git a/random.cabal b/random.cabal index c61d657ba..f3079977c 100644 --- a/random.cabal +++ b/random.cabal @@ -37,21 +37,21 @@ description: As an example, here is how you can simulate rolls of a six-sided die using 'System.Random.Stateful.uniformRM': . - >>> let rollM = uniformRM (1, 6) :: MonadRandom g s m => g s -> m Word8 + >>> let rollM = uniformRM (1, 6) :: StatefulGen g s m => g s -> m Word8 >>> let pureGen = mkStdGen 42 >>> runGenState_ pureGen (replicateM 10 . rollM) :: m [Word8] [1,1,3,2,4,5,3,4,6,2] . The monadic adapter 'System.Random.Stateful.runGenState_' is used here to lift the pure pseudo-random number generator @pureGen@ into the - 'System.Random.Stateful.MonadRandom' context. + 'System.Random.Stateful.StatefulGen' context. . The monadic interface can also be used with existing monadic pseudo-random number generators. In this example, we use the one provided in the package: . >>> import System.Random.MWC as MWC - >>> let rollM = uniformRM (1, 6) :: MonadRandom g s m => g s -> m Word8 + >>> let rollM = uniformRM (1, 6) :: StatefulGen g s m => g s -> m Word8 >>> monadicGen <- MWC.create >>> (replicateM 10 . rollM) monadicGen :: m [Word8] [2,3,6,6,4,4,3,1,5,4] @@ -82,17 +82,16 @@ library hs-source-dirs: src default-language: Haskell2010 - ghc-options: - -Weverything -Wno-implicit-prelude -Wno-missing-import-lists - -Wno-missing-local-signatures -Wno-redundant-constraints - -Wno-unsafe + ghc-options: -Wall + -Wincomplete-record-updates + -Wincomplete-uni-patterns build-depends: base >=4.10 && <5, - bytestring >=0.10 && <0.11, + bytestring >=0.10.4 && <0.11, deepseq >=1.1 && <2, mtl >=2.2 && <2.3, - splitmix >=0.0.3 && <0.1 + splitmix >=0.1 && <0.2 test-suite legacy-test type: exitcode-stdio-1.0 @@ -108,7 +107,7 @@ test-suite legacy-test default-language: Haskell2010 ghc-options: -with-rtsopts=-M4M -Wno-deprecations build-depends: - base >=4.10 && <5, + base -any, containers >=0.5 && <0.7, random -any @@ -118,7 +117,7 @@ test-suite doctests hs-source-dirs: test default-language: Haskell2010 build-depends: - base >=4.10 && <5, + base -any, doctest >=0.15 && <0.17, mwc-random >=0.13 && <0.15, primitive >=0.6 && <0.8, @@ -136,8 +135,8 @@ test-suite spec default-language: Haskell2010 ghc-options: -Wall build-depends: - base >=4.10 && <5, - bytestring >=0.10 && <0.11, + base -any, + bytestring -any, random -any, smallcheck >=1.1 && <1.2, tasty >=1.0 && <1.3, @@ -155,7 +154,7 @@ benchmark legacy-bench -Wall -O2 -threaded -rtsopts -with-rtsopts=-N -Wno-deprecations build-depends: - base >=4.10 && <5, + base -any, random -any, rdtsc -any, split >=0.2 && <0.3, @@ -168,7 +167,7 @@ benchmark bench default-language: Haskell2010 ghc-options: -Wall -O2 build-depends: - base >=4.10 && <5, + base -any, gauge >=0.2.3 && <0.3, random -any, - splitmix >=0.0.3 && <0.1 + splitmix >=0.1 && <0.2 diff --git a/stack-coveralls.yaml b/stack-coveralls.yaml index 5575c2ffb..7e31a0760 100644 --- a/stack-coveralls.yaml +++ b/stack-coveralls.yaml @@ -2,7 +2,5 @@ resolver: lts-14.27 packages: - . extra-deps: +- splitmix-0.1@sha256:d50c4d0801a35be7875a040470c09863342514930c82a7d25780a6c2efc4fda9,5249 - rdtsc-1.3.0.1@sha256:0a6e8dc715ba82ad72c7e2b1c2f468999559bec059d50540719a80b00dcc4e66,1557 -flags: - splitmix: - random: false diff --git a/stack-old.yaml b/stack-old.yaml index 8c00d6f16..554c94305 100644 --- a/stack-old.yaml +++ b/stack-old.yaml @@ -17,10 +17,7 @@ extra-deps: # In addition, the doctests require 'SMGen' from the splitmix package to # implement 'Prim'. So far, this is only the case on lehin's fork, so we use # that. -- splitmix-0.0.4@sha256:fb9bb8b54a2e76c8a021fe5c4c3798047e1f60e168379a1f80693047fe00ad0e,4813 +- splitmix-0.1@sha256:d50c4d0801a35be7875a040470c09863342514930c82a7d25780a6c2efc4fda9,5249 - doctest-0.16.2@sha256:2f96e9bbe9aee11b47453c82c24b3dc76cdbb8a2a7c984dfd60b4906d08adf68,6942 - cabal-doctest-1.0.8@sha256:34dff6369d417df2699af4e15f06bc181d495eca9c51efde173deae2053c197c,1491 - rdtsc-1.3.0.1@sha256:0a6e8dc715ba82ad72c7e2b1c2f468999559bec059d50540719a80b00dcc4e66,1557 -flags: - splitmix: - random: false diff --git a/stack.yaml b/stack.yaml index 396552681..2e2d5447a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,7 +1,5 @@ resolver: lts-15.1 packages: - . -extra-deps: [] -flags: - splitmix: - random: false +extra-deps: +- splitmix-0.1@sha256:d50c4d0801a35be7875a040470c09863342514930c82a7d25780a6c2efc4fda9,5249