packages feed

random 1.2.1.2 → 1.2.1.3

raw patch · 3 files changed

+22/−37 lines, 3 filesdep −doctestdep −mwc-randomdep −unliftiodep ~basedep ~containersdep ~primitive

Dependencies removed: doctest, mwc-random, unliftio, vector

Dependency ranges changed: base, containers, primitive

Files

bench/Main.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} module Main (main) where@@ -13,9 +14,11 @@ import Numeric.Natural (Natural) import System.Random.SplitMix as SM import Test.Tasty.Bench+#if MIN_VERSION_primitive(0,7,1) import Control.Monad.Primitive-import Data.Primitive.PrimArray import Data.Primitive.Types+import Data.Primitive.PrimArray+#endif  import System.Random.Stateful @@ -198,7 +201,9 @@             in pureUniformRBench (Proxy :: Proxy Natural) range sz           ]         , bgroup "floating"-          [ bgroup "IO"+          [+#if MIN_VERSION_primitive(0,7,1)+            bgroup "IO"             [ env ((,) <$> getStdGen <*> newAlignedPinnedPrimArray sz) $ \ ~(gen, ma) ->                 bench "uniformFloat01M" $                 nfIO (runStateGenT gen (fillMutablePrimArrayM uniformFloat01M ma))@@ -212,7 +217,9 @@                 bench "uniformDoublePositive01M" $                 nfIO (runStateGenT gen (fillMutablePrimArrayM uniformDoublePositive01M ma))             ]-          , bgroup "State"+          ,+#endif+            bgroup "State"             [ env getStdGen $                 bench "uniformFloat01M" . nf (`runStateGen` (replicateM_ sz . uniformFloat01M))             , env getStdGen $@@ -320,7 +327,7 @@       | i < n = go (i + 1) $ f g       | otherwise = y -+#if MIN_VERSION_primitive(0,7,1) fillMutablePrimArrayM ::      (Prim a, PrimMonad m)   => (gen -> m a)@@ -334,3 +341,4 @@         | otherwise = pure ()   go 0   unsafeFreezePrimArray ma+#endif
random.cabal view
@@ -1,6 +1,6 @@ cabal-version:      >=1.10 name:               random-version:            1.2.1.2+version:            1.2.1.3 license:            BSD3 license-file:       LICENSE maintainer:         core-libraries-committee@haskell.org@@ -122,8 +122,8 @@         ghc-options:             -Wno-deprecations     build-depends:-        base,-        containers >=0.5 && <0.7,+        base >=4.8 && <5,+        containers >=0.5 && <0.8,         random  test-suite doctests@@ -132,16 +132,7 @@     hs-source-dirs:   test     default-language: Haskell2010     build-depends:-        base,-        doctest >=0.15 && <0.23-    if impl(ghc >= 8.2) && impl(ghc < 8.10)-        build-depends:-            mwc-random >=0.13 && <0.16,-            primitive >=0.6 && <0.8,-            random,-            stm,-            unliftio >=0.2 && <0.3,-            vector >= 0.10 && <0.14+        base >=4.8 && <5  test-suite spec     type:             exitcode-stdio-1.0@@ -155,7 +146,7 @@     default-language: Haskell2010     ghc-options:      -Wall     build-depends:-        base,+        base >=4.8 && <5,         bytestring,         random,         smallcheck >=1.2 && <1.3,@@ -174,7 +165,7 @@     default-language: Haskell2010     ghc-options:      -Wall     build-depends:-        base,+        base >=4.8 && <5,         random,         tasty >=1.0 && <1.6     if impl(ghc >= 8.0)@@ -196,7 +187,7 @@             -Wno-deprecations      build-depends:-        base,+        base >=4.8 && <5,         random,         rdtsc,         split >=0.2 && <0.3,@@ -209,9 +200,9 @@     default-language: Haskell2010     ghc-options:      -Wall -O2     build-depends:-        base,+        base >=4.8 && <5,         mtl,-        primitive >= 0.7.1,+        primitive,         random,         splitmix >=0.1 && <0.2,         tasty-bench
test/doctests.hs view
@@ -1,18 +1,4 @@-{-# LANGUAGE CPP #-} module Main where -#if __GLASGOW_HASKELL__ >= 802 && __GLASGOW_HASKELL__ < 810--import Test.DocTest (doctest)- main :: IO ()-main = doctest ["src"]--#else---- Also disabled in cabal file.--- TODO: fix doctest support-main :: IO ()-main = putStrLn "\nDoctests are not supported for older ghc version\n"--#endif+main = putStrLn "Doctest have been removed from the cabal into a standalone CI step in random-1.3"