From e32a16b5d4fc66bee2f28b1b1f7ae8fb3f8a8cf4 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Tue, 27 Jul 2010 12:06:39 +0000 Subject: compat with QuickCheck>=2.1.1 --- lib/Numeric/LinearAlgebra/Tests/Instances.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/Numeric/LinearAlgebra/Tests/Instances.hs') 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)] shrinkPair (a,b) = [ (a,x) | x <- shrink b ] ++ [ (x,b) | x <- shrink a ] #endif - +#if MIN_VERSION_QuickCheck(2,1,1) +#else instance (Arbitrary a, RealFloat a) => Arbitrary (Complex a) where arbitrary = do re <- arbitrary @@ -58,6 +59,8 @@ instance (Arbitrary a, RealFloat a) => Arbitrary (Complex a) where coarbitrary = undefined #endif +#endif + chooseDim = sized $ \m -> choose (1,max 1 m) instance (Field a, Arbitrary a) => Arbitrary (Vector a) where -- cgit v1.2.3