@@ -22,29 +22,12 @@ import Types
22import qualified Data.DList as DList
22import qualified Data.DList as DList
23import qualified Data.HashMap.Strict as HM
23import qualified Data.HashMap.Strict as HM
25−#if !MIN_VERSION_QuickCheck(2,9,0)
26−import Control.Applicative (Const(..))
27−import Data.Functor.Identity (Identity (..))
28−import Data.List.NonEmpty (NonEmpty(..))
30−import Test.QuickCheck (getNonNegative, listOf1, resize)
33−#if !MIN_VERSION_QuickCheck(2,10,0)
34−import Data.Functor.Compose (Compose (..))
35−import Data.Proxy (Proxy(..))
38import Data.Orphans ()
25import Data.Orphans ()
39import Test.QuickCheck.Instances ()
26import Test.QuickCheck.Instances ()
40#if MIN_VERSION_base(4,7,0)
27#if MIN_VERSION_base(4,7,0)
41import Data.Hashable.Time ()
28import Data.Hashable.Time ()
44−#if !MIN_VERSION_base(4,8,0) && !MIN_VERSION_QuickCheck(2,8,3)
45−import Numeric.Natural
48{-# ANN module ("HLint: ignore Use fewer imports"::String) #-}
31{-# ANN module ("HLint: ignore Use fewer imports"::String) #-}
50-- "System" types.
33-- "System" types.
@@ -186,37 +169,5 @@ instance (ApproxEq a) => ApproxEq [a] where
186-- a definition is given below.
169-- a definition is given below.
189−#if !MIN_VERSION_base(4,8,0) && !MIN_VERSION_QuickCheck(2,8,3)
190−instance Arbitrary Natural where
191− arbitrary = fromInteger . abs <$> arbitrary
194−#if !MIN_VERSION_QuickCheck(2,10,0)
195−instance Arbitrary (Proxy a) where
196− arbitrary = pure Proxy
198−instance Arbitrary (f (g a)) => Arbitrary (Compose f g a) where
199− arbitrary = Compose <$> arbitrary
202instance Arbitrary a => Arbitrary (DList.DList a) where
172instance Arbitrary a => Arbitrary (DList.DList a) where
203 arbitrary = DList.fromList <$> arbitrary
173 arbitrary = DList.fromList <$> arbitrary
205−#if !MIN_VERSION_QuickCheck(2,9,0)
206−instance Arbitrary a => Arbitrary (Const a b) where
207− arbitrary = Const <$> arbitrary
209−instance Arbitrary a => Arbitrary (NonEmpty a) where
210− arbitrary = (:|) <$> arbitrary <*> arbitrary
212−instance Arbitrary Version where
213− arbitrary = makeVersion . fmap getNonNegative <$> resize 4 (listOf1 arbitrary)
215−#if !MIN_VERSION_base(4,8,0)
216−makeVersion :: [Int] -> Version
217−makeVersion b = Version b []
220−instance Arbitrary a => Arbitrary (Identity a) where
221− arbitrary = Identity <$> arbitrary