summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests/Instances.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-07-27 12:06:39 +0000
committerAlberto Ruiz <aruiz@um.es>2010-07-27 12:06:39 +0000
commite32a16b5d4fc66bee2f28b1b1f7ae8fb3f8a8cf4 (patch)
treefb1cfa731b58891b50bd1373acf6c68004401410 /lib/Numeric/LinearAlgebra/Tests/Instances.hs
parentc104df60266d5e0bc94e5b0a7eedc1d949975fc1 (diff)
compat with QuickCheck>=2.1.1
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests/Instances.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests/Instances.hs5
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)]
43shrinkPair (a,b) = [ (a,x) | x <- shrink b ] ++ [ (x,b) | x <- shrink a ] 43shrinkPair (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
47instance (Arbitrary a, RealFloat a) => Arbitrary (Complex a) where 48instance (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
61chooseDim = sized $ \m -> choose (1,max 1 m) 64chooseDim = sized $ \m -> choose (1,max 1 m)
62 65
63instance (Field a, Arbitrary a) => Arbitrary (Vector a) where 66instance (Field a, Arbitrary a) => Arbitrary (Vector a) where