diff options
author | Alberto Ruiz <aruiz@um.es> | 2010-07-27 12:06:39 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2010-07-27 12:06:39 +0000 |
commit | e32a16b5d4fc66bee2f28b1b1f7ae8fb3f8a8cf4 (patch) | |
tree | fb1cfa731b58891b50bd1373acf6c68004401410 /lib/Numeric/LinearAlgebra/Tests/Instances.hs | |
parent | c104df60266d5e0bc94e5b0a7eedc1d949975fc1 (diff) |
compat with QuickCheck>=2.1.1
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests/Instances.hs')
-rw-r--r-- | lib/Numeric/LinearAlgebra/Tests/Instances.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests/Instances.hs b/lib/Numeric/LinearAlgebra/Tests/Instances.hs index d0adfba..bfe6871 100644 --- a/lib/Numeric/LinearAlgebra/Tests/Instances.hs +++ b/lib/Numeric/LinearAlgebra/Tests/Instances.hs | |||
@@ -43,7 +43,8 @@ shrinkPair :: (Arbitrary a, Arbitrary b) => (a,b) -> [(a,b)] | |||
43 | shrinkPair (a,b) = [ (a,x) | x <- shrink b ] ++ [ (x,b) | x <- shrink a ] | 43 | shrinkPair (a,b) = [ (a,x) | x <- shrink b ] ++ [ (x,b) | x <- shrink a ] |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | 46 | #if MIN_VERSION_QuickCheck(2,1,1) | |
47 | #else | ||
47 | instance (Arbitrary a, RealFloat a) => Arbitrary (Complex a) where | 48 | instance (Arbitrary a, RealFloat a) => Arbitrary (Complex a) where |
48 | arbitrary = do | 49 | arbitrary = do |
49 | re <- arbitrary | 50 | re <- arbitrary |
@@ -58,6 +59,8 @@ instance (Arbitrary a, RealFloat a) => Arbitrary (Complex a) where | |||
58 | coarbitrary = undefined | 59 | coarbitrary = undefined |
59 | #endif | 60 | #endif |
60 | 61 | ||
62 | #endif | ||
63 | |||
61 | chooseDim = sized $ \m -> choose (1,max 1 m) | 64 | chooseDim = sized $ \m -> choose (1,max 1 m) |
62 | 65 | ||
63 | instance (Field a, Arbitrary a) => Arbitrary (Vector a) where | 66 | instance (Field a, Arbitrary a) => Arbitrary (Vector a) where |