summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNickSmallbone <>2018-10-02 19:32:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-10-02 19:32:00 (GMT)
commit0e23c672ed55615abee79deb62b6ebe53110bde9 (patch)
treea94170e6e8e42a4ff99b8061704f949a26b9a558
parent2f66a5d038d3301d797ba79a53ce55ebaf9f54a9 (diff)
version 2.12.6.1HEAD2.12.6.1master
-rw-r--r--QuickCheck.cabal4
-rw-r--r--Test/QuickCheck/Gen.hs8
-rw-r--r--Test/QuickCheck/Modifiers.hs23
3 files changed, 4 insertions, 31 deletions
diff --git a/QuickCheck.cabal b/QuickCheck.cabal
index e9c2308..4ed7b40 100644
--- a/QuickCheck.cabal
+++ b/QuickCheck.cabal
@@ -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 head
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.
diff --git a/Test/QuickCheck/Gen.hs b/Test/QuickCheck/Gen.hs
index 73d1ddc..d97dda1 100644
--- a/Test/QuickCheck/Gen.hs
+++ b/Test/QuickCheck/Gen.hs
@@ -123,14 +123,6 @@ resize n (MkGen g) = MkGen (\r _ -> g r n)
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)
diff --git a/Test/QuickCheck/Modifiers.hs b/Test/QuickCheck/Modifiers.hs
index 70da652..ec08748 100644
--- a/Test/QuickCheck/Modifiers.hs
+++ b/Test/QuickCheck/Modifiers.hs
@@ -58,8 +58,6 @@ module Test.QuickCheck.Modifiers
, NonNegative(..)
, Large(..)
, Small(..)
- , Larger(..)
- , Smaller(..)
, Smart(..)
, Shrink2(..)
#ifndef NO_MULTI_PARAM_TYPE_CLASSES
@@ -346,8 +344,8 @@ instance (Integral a, Bounded a) => Arbitrary (Large a) where
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
@@ -366,23 +364,6 @@ instance Integral a => Arbitrary (Small a) where
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
newtype Shrink2 a = Shrink2 {getShrink2 :: a}
deriving ( Eq, Ord, Show, Read