QuickCheck 2.13.1 → 2.13.2
raw patch · 6 files changed
+35/−5 lines, 6 filesdep ~basedep ~containersdep ~randomPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, containers, random
API changes (from Hackage documentation)
+ Test.QuickCheck: functionVoid :: (forall b. void -> b) -> void :-> c
+ Test.QuickCheck.Function: functionVoid :: (forall b. void -> b) -> void :-> c
Files
- QuickCheck.cabal +11/−3
- Test/QuickCheck.hs +1/−0
- Test/QuickCheck/Function.hs +9/−1
- Test/QuickCheck/Gen.hs +5/−0
- Test/QuickCheck/Monadic.hs +2/−0
- changelog +7/−1
QuickCheck.cabal view
@@ -1,5 +1,5 @@ Name: QuickCheck-Version: 2.13.1+Version: 2.13.2 Cabal-Version: >= 1.8 Build-type: Simple License: BSD3@@ -56,14 +56,22 @@ source-repository this type: git location: https://github.com/nick8325/quickcheck- tag: 2.13.1+ tag: 2.13.2 flag templateHaskell Description: Build Test.QuickCheck.All, which uses Template Haskell. Default: True library- Build-depends: base >=4.3 && <5, random, containers+ Build-depends: base >=4.3 && <5, random >=1.0.0.3 && <1.2, containers++ -- random is explicitly Trustworthy since 1.0.1.0+ -- similar constraint for containers+ -- Note: QuickCheck is Safe only with GHC >= 7.4 (see below)+ if impl(ghc >= 7.2)+ Build-depends: random >=1.0.1.0+ if impl(ghc >= 7.4)+ Build-depends: containers >=0.4.2.1 -- Modules that are always built. Exposed-Modules:
Test/QuickCheck.hs view
@@ -171,6 +171,7 @@ , functionIntegral , functionRealFrac , functionBoundedEnum+ , functionVoid #endif -- * The 'CoArbitrary' typeclass: generation of functions the old-fashioned way
Test/QuickCheck/Function.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TypeOperators, GADTs, CPP #-}+{-# LANGUAGE TypeOperators, GADTs, CPP, Rank2Types #-} #ifndef NO_SAFE_HASKELL {-# LANGUAGE Safe #-} #endif@@ -48,6 +48,7 @@ , functionIntegral , functionRealFrac , functionBoundedEnum+ , functionVoid #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708 , pattern Fn , pattern Fn2@@ -173,6 +174,13 @@ -- | Provides a 'Function' instance for types with 'Show' and 'Read'. functionShow :: (Show a, Read a) => (a->c) -> (a:->c) functionShow f = functionMap show read f++-- | Provides a 'Function' instance for types isomorphic to 'Data.Void.Void'.+--+-- An actual @'Function' 'Data.Void.Void'@ instance is defined in+-- @quickcheck-instances@.+functionVoid :: (forall b. void -> b) -> void :-> c+functionVoid _ = Nil -- | The basic building block for 'Function' instances. -- Provides a 'Function' instance by mapping to and from a type that
Test/QuickCheck/Gen.hs view
@@ -189,6 +189,11 @@ -- The input list must be non-empty. frequency :: [(Int, Gen a)] -> Gen a frequency [] = error "QuickCheck.frequency used with empty list"+frequency xs+ | any (< 0) (map fst xs) =+ error "QuickCheck.frequency: negative weight"+ | all (== 0) (map fst xs) =+ error "QuickCheck.frequency: all weights were zero" frequency xs0 = choose (1, tot) >>= (`pick` xs0) where tot = sum (map fst xs0)
Test/QuickCheck/Monadic.hs view
@@ -123,7 +123,9 @@ instance Monad m => Monad (PropertyM m) where return = pure (>>=) = bind+#if !MIN_VERSION_base(4,13,0) fail = fail_+#endif #ifndef NO_MONADFAIL instance Monad m => Fail.MonadFail (PropertyM m) where
changelog view
@@ -1,4 +1,10 @@-QuickCheck 2.13.1 (release 2019-03-29)+QuickCheck 2.13.2 (released 2019-06-30)+ * Compatibility with GHC 8.8 (thanks to Bodigrim)+ * Improve error message when 'frequency' is used with only zero weights+ * Add 'functionVoid' combinator (thanks to Oleg Grenrus)+ * Tighten bounds for random package (thanks to Oleg Grenrus)++QuickCheck 2.13.1 (released 2019-03-29) * A couple of bug fixes QuickCheck 2.13 (released 2019-03-26)