summaryrefslogtreecommitdiff
path: root/examples/tests.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-09-08 09:46:33 +0000
committerAlberto Ruiz <aruiz@um.es>2007-09-08 09:46:33 +0000
commit34380f2b5d7b048a4d68197f16a8db0e53742030 (patch)
tree444aff88cda5c247d49bac0d294d8cfb9ef7bf23 /examples/tests.hs
parent0c38c1b0e122a56ea98c494e60ba90afe2688664 (diff)
type classes
Diffstat (limited to 'examples/tests.hs')
-rw-r--r--examples/tests.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/tests.hs b/examples/tests.hs
index 5c7cd22..7eabf87 100644
--- a/examples/tests.hs
+++ b/examples/tests.hs
@@ -1,3 +1,5 @@
1{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-}
2
1-- 3--
2-- QuickCheck tests 4-- QuickCheck tests
3-- 5--
@@ -19,6 +21,7 @@ import Test.QuickCheck
19import Test.HUnit hiding ((~:)) 21import Test.HUnit hiding ((~:))
20import Complex 22import Complex
21import LinearAlgebra.Algorithms 23import LinearAlgebra.Algorithms
24import LinearAlgebra.Linear
22import GSL.Matrix 25import GSL.Matrix
23import GSL.Compat hiding ((<>),constant) 26import GSL.Compat hiding ((<>),constant)
24 27
@@ -144,7 +147,7 @@ instance (Field a, Arbitrary a) => Arbitrary (SqM a) where
144 coarbitrary = undefined 147 coarbitrary = undefined
145 148
146data Sym a = Sym (Matrix a) deriving Show 149data Sym a = Sym (Matrix a) deriving Show
147instance (Field a, Arbitrary a, Num a) => Arbitrary (Sym a) where 150instance (Linear Vector a, Arbitrary a) => Arbitrary (Sym a) where
148 arbitrary = do 151 arbitrary = do
149 SqM m <- arbitrary 152 SqM m <- arbitrary
150 return $ Sym (m + trans m) 153 return $ Sym (m + trans m)