summaryrefslogtreecommitdiff
path: root/examples/tests.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-10-31 13:36:37 +0000
committerAlberto Ruiz <aruiz@um.es>2007-10-31 13:36:37 +0000
commitdb223fb5f9cd4adef54736812f796b48ecc289e6 (patch)
treef787f8d7c929f2b978bb8fd6aa83aa1b5db05339 /examples/tests.hs
parentbf838323545fe0878382f8f4d41b0f36714afa43 (diff)
Field->Element, GenMat->Field
Diffstat (limited to 'examples/tests.hs')
-rw-r--r--examples/tests.hs6
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
42instance (Field a, Arbitrary a) => Arbitrary (Matrix a) where 42instance (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
54data PairM a = PairM (Matrix a) (Matrix a) deriving Show 54data PairM a = PairM (Matrix a) (Matrix a) deriving Show
55instance (Num a, Field a, Arbitrary a) => Arbitrary (PairM a) where 55instance (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
66data SqM a = SqM (Matrix a) deriving Show 66data SqM a = SqM (Matrix a) deriving Show
67sqm (SqM a) = a 67sqm (SqM a) = a
68instance (Field a, Arbitrary a) => Arbitrary (SqM a) where 68instance (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)