prolude 0.0.0.8 → 0.0.0.9
raw patch · 3 files changed
+45/−13 lines, 3 filesdep +QuickCheckdep +generic-randomdep +quickcheck-instancesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependencies added: QuickCheck, generic-random, quickcheck-instances
API changes (from Hackage documentation)
+ Prolude.Test: ArbitraryUniform :: a -> ArbitraryUniform a
+ Prolude.Test: [unArbitraryUniform] :: ArbitraryUniform a -> a
+ Prolude.Test: arbitrary :: Arbitrary a => Gen a
+ Prolude.Test: arbitraryIO :: (Arbitrary a, MonadIO m) => m a
+ Prolude.Test: class Arbitrary a
+ Prolude.Test: generate :: Gen a -> IO a
+ Prolude.Test: instance (Generic.Random.Internal.Generic.GArbitrary Generic.Random.Internal.Generic.UnsizedOpts a, Generic.Random.Internal.Generic.GUniformWeight a) => Test.QuickCheck.Arbitrary.Arbitrary (Prolude.Test.ArbitraryUniform a)
+ Prolude.Test: instance GHC.Generics.Generic a => GHC.Generics.Generic (Prolude.Test.ArbitraryUniform a)
+ Prolude.Test: newtype ArbitraryUniform a
+ Prolude.Test: resize :: Int -> Gen a -> Gen a
+ Prolude.Test: sublistOf :: [a] -> Gen [a]
Files
- Prolude.hs +2/−0
- Prolude/Test.hs +26/−0
- prolude.cabal +17/−13
Prolude.hs view
@@ -12,6 +12,7 @@ , module Prolude.MongoDB , module Prolude.Persist , module Prolude.Prim+ , module Prolude.Test , module Prolude.Text , module Prolude.Time )@@ -30,5 +31,6 @@ import Prolude.MongoDB import Prolude.Persist import Prolude.Prim+import Prolude.Test import Prolude.Text import Prolude.Time
+ Prolude/Test.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE DerivingVia #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE MonoLocalBinds #-}+{-# LANGUAGE UndecidableInstances #-}++module Prolude.Test + ( module Test.QuickCheck+ , ArbitraryUniform(..)+ , arbitraryIO+ )+where++import Test.QuickCheck (Arbitrary(arbitrary), generate, resize, sublistOf)+import Test.QuickCheck.Instances ()+import qualified Control.Monad.IO.Class as Monad+import qualified Generic.Random as Random+import qualified GHC.Generics as Generic++newtype ArbitraryUniform a = ArbitraryUniform { unArbitraryUniform :: a }+ deriving Generic.Generic via a++instance (Random.GArbitrary Random.UnsizedOpts a, Random.GUniformWeight a) => Arbitrary (ArbitraryUniform a) where+ arbitrary = Random.genericArbitraryU++arbitraryIO :: (Arbitrary a, Monad.MonadIO m) => m a+arbitraryIO = Monad.liftIO (generate arbitrary)
prolude.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.10 name: prolude-version: 0.0.0.8+version: 0.0.0.9 synopsis: ITProTV's custom prelude description: Prolude is ITProTV's custom prelude.@@ -35,20 +35,24 @@ Prolude.MongoDB Prolude.Persist Prolude.Prim+ Prolude.Test Prolude.Text Prolude.Time build-depends: base >= 4.13.0 && < 4.15- , aeson >= 1.4.7 && < 1.6- , bytestring >= 0.10.10 && < 0.11- , cassava >= 0.5.2.0 && < 0.6- , containers >= 0.6.2 && < 0.7- , mongoDB >= 2.7.0 && < 2.8- , persistent >= 2.8 && < 3- , persistent-mongoDB >= 2.8 && < 3- , safe-exceptions >= 0.1.7 && < 0.2- , scientific >= 0.3.6 && < 0.4- , text >= 1.2.3 && < 1.3- , time >= 1.9.3 && < 1.10- , vector >= 0.12.1 && < 0.13+ , aeson >= 1.4.7 && < 1.6+ , bytestring >= 0.10.10 && < 0.11+ , cassava >= 0.5.2.0 && < 0.6+ , containers >= 0.6.2 && < 0.7+ , generic-random >= 1.3.0.1 && < 1.4+ , mongoDB >= 2.7.0 && < 2.8+ , QuickCheck >= 2.14.1 && < 2.15+ , quickcheck-instances >= 0.3.25 && < 0.4+ , persistent >= 2.8 && < 3+ , persistent-mongoDB >= 2.8 && < 3+ , safe-exceptions >= 0.1.7 && < 0.2+ , scientific >= 0.3.6 && < 0.4+ , text >= 1.2.3 && < 1.3+ , time >= 1.9.3 && < 1.10+ , vector >= 0.12.1 && < 0.13