QuickCheck 2.12.6 → 2.12.6.1
raw patch · 3 files changed
+4/−31 lines, 3 filesdep ~basedep ~deepseqdep ~random
Dependency ranges changed: base, deepseq, random
Files
- QuickCheck.cabal +2/−2
- Test/QuickCheck/Gen.hs +0/−8
- Test/QuickCheck/Modifiers.hs +2/−21
QuickCheck.cabal view
@@ -1,5 +1,5 @@ Name: QuickCheck-Version: 2.12.6+Version: 2.12.6.1 Cabal-Version: >= 1.8 Build-type: Simple License: BSD3@@ -55,7 +55,7 @@ source-repository this type: git location: https://github.com/nick8325/quickcheck- tag: 2.12.6+ tag: 2.12.6.1 flag templateHaskell Description: Build Test.QuickCheck.All, which uses Template Haskell.
Test/QuickCheck/Gen.hs view
@@ -123,14 +123,6 @@ scale :: (Int -> Int) -> Gen a -> Gen a scale f g = sized (\n -> resize (f n) g) --- | Increase the size parameter by a factor of 2.-larger :: Gen a -> Gen a-larger = scale (*2)---- | Decrease the size parameter by a factor of 2.-smaller :: Gen a -> Gen a-smaller = scale (`div` 2)- -- | Generates a random element in the given inclusive range. choose :: Random a => (a,a) -> Gen a choose rng = MkGen (\r _ -> let (x,_) = randomR rng r in x)
Test/QuickCheck/Modifiers.hs view
@@ -58,8 +58,6 @@ , NonNegative(..) , Large(..) , Small(..)- , Larger(..)- , Smaller(..) , Smart(..) , Shrink2(..) #ifndef NO_MULTI_PARAM_TYPE_CLASSES@@ -346,8 +344,8 @@ shrink (Large x) = fmap Large (shrinkIntegral x) ----------------------------------------------------------------------------- | @Small x@: generates values of the integral type @x@ drawn from a--- small range. The opposite of 'Large'.+-- | @Small x@: generates values of @x@ drawn from a small range.+-- The opposite of 'Large'. newtype Small a = Small {getSmall :: a} deriving ( Eq, Ord, Show, Read #ifndef NO_NEWTYPE_DERIVING@@ -364,23 +362,6 @@ instance Integral a => Arbitrary (Small a) where arbitrary = fmap Small arbitrarySizedIntegral shrink (Small x) = map Small (shrinkIntegral x)------------------------------------------------------------------------------- | @Larger x@: doubles the QuickCheck size parameter used when--- generating @x@.-newtype Larger a = Larger {getLarger :: a}- deriving ( Eq, Ord, Show, Read-#ifndef NO_TYPEABLE- , Typeable-#endif- )--instance Functor Larger where- fmap f (Larger x) = Larger (f x)--instance Arbitrary a => Arbitrary (Larger a) where- arbitrary = larger arbitrary- shrink (Larger x) = map Larger (shrink x) -------------------------------------------------------------------------- -- | @Shrink2 x@: allows 2 shrinking steps at the same time when shrinking x