diff options
Diffstat (limited to 'examples/tests.hs')
-rw-r--r-- | examples/tests.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/tests.hs b/examples/tests.hs index 3fea81e..ad70266 100644 --- a/examples/tests.hs +++ b/examples/tests.hs | |||
@@ -39,7 +39,7 @@ instance (Arbitrary a, RealFloat a) => Arbitrary (Complex a) where | |||
39 | return (r:+i) | 39 | return (r:+i) |
40 | coarbitrary = undefined | 40 | coarbitrary = undefined |
41 | 41 | ||
42 | instance (Field a, Arbitrary a) => Arbitrary (Matrix a) where | 42 | instance (Element a, Arbitrary a) => Arbitrary (Matrix a) where |
43 | arbitrary = do --m <- sized $ \max -> choose (1,1+3*max) | 43 | arbitrary = do --m <- sized $ \max -> choose (1,1+3*max) |
44 | m <- choose (1,maxdim) | 44 | m <- choose (1,maxdim) |
45 | n <- choose (1,maxdim) | 45 | n <- choose (1,maxdim) |
@@ -52,7 +52,7 @@ instance (Field a, Arbitrary a) => Arbitrary (Matrix a) where | |||
52 | coarbitrary = undefined | 52 | coarbitrary = undefined |
53 | 53 | ||
54 | data PairM a = PairM (Matrix a) (Matrix a) deriving Show | 54 | data PairM a = PairM (Matrix a) (Matrix a) deriving Show |
55 | instance (Num a, Field a, Arbitrary a) => Arbitrary (PairM a) where | 55 | instance (Num a, Element a, Arbitrary a) => Arbitrary (PairM a) where |
56 | arbitrary = do | 56 | arbitrary = do |
57 | a <- choose (1,maxdim) | 57 | a <- choose (1,maxdim) |
58 | b <- choose (1,maxdim) | 58 | b <- choose (1,maxdim) |
@@ -65,7 +65,7 @@ instance (Num a, Field a, Arbitrary a) => Arbitrary (PairM a) where | |||
65 | 65 | ||
66 | data SqM a = SqM (Matrix a) deriving Show | 66 | data SqM a = SqM (Matrix a) deriving Show |
67 | sqm (SqM a) = a | 67 | sqm (SqM a) = a |
68 | instance (Field a, Arbitrary a) => Arbitrary (SqM a) where | 68 | instance (Element a, Arbitrary a) => Arbitrary (SqM a) where |
69 | arbitrary = do | 69 | arbitrary = do |
70 | n <- choose (1,maxdim) | 70 | n <- choose (1,maxdim) |
71 | l <- vector (n*n) | 71 | l <- vector (n*n) |