summaryrefslogtreecommitdiff
path: root/packages/tests
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-08-08 02:22:30 -0400
committerJoe Crayne <joe@jerkface.net>2019-08-08 22:47:46 -0400
commitbadcbdfddc4be31fc79a6df4553795af18069efe (patch)
tree90c38bd8793b53a5e6f00049eb78acaa8d88d711 /packages/tests
parentd844a145f2e8808c9f75cd99c673d5f5c8960bf2 (diff)
Removed the Element class.tower
Diffstat (limited to 'packages/tests')
-rw-r--r--packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
index 97cfd01..12eddb2 100644
--- a/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
+++ b/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
@@ -33,6 +33,7 @@ import System.Random
33import Numeric.LinearAlgebra.HMatrix hiding (vector) 33import Numeric.LinearAlgebra.HMatrix hiding (vector)
34import Control.Monad(replicateM) 34import Control.Monad(replicateM)
35import Test.QuickCheck(Arbitrary,arbitrary,choose,vector,sized,shrink) 35import Test.QuickCheck(Arbitrary,arbitrary,choose,vector,sized,shrink)
36import Foreign.Storable
36 37
37import GHC.TypeLits 38import GHC.TypeLits
38import Data.Proxy (Proxy(..)) 39import Data.Proxy (Proxy(..))
@@ -69,7 +70,7 @@ instance KnownNat n => Arbitrary (Static.R n) where
69 70
70 shrink _v = [] 71 shrink _v = []
71 72
72instance (Element a, Arbitrary a) => Arbitrary (Matrix a) where 73instance (Storable a, Arbitrary a) => Arbitrary (Matrix a) where
73 arbitrary = do 74 arbitrary = do
74 m <- chooseDim 75 m <- chooseDim
75 n <- chooseDim 76 n <- chooseDim
@@ -98,7 +99,7 @@ instance (KnownNat n, KnownNat m) => Arbitrary (Static.L m n) where
98 99
99-- a square matrix 100-- a square matrix
100newtype (Sq a) = Sq (Matrix a) deriving Show 101newtype (Sq a) = Sq (Matrix a) deriving Show
101instance (Element a, Arbitrary a) => Arbitrary (Sq a) where 102instance (Storable a, Arbitrary a) => Arbitrary (Sq a) where
102 arbitrary = do 103 arbitrary = do
103 n <- chooseDim 104 n <- chooseDim
104 l <- vector (n*n) 105 l <- vector (n*n)
@@ -141,7 +142,7 @@ instance (Field a, Arbitrary a, Num (Vector a)) => Arbitrary (Herm a) where
141 return $ sym m' 142 return $ sym m'
142 143
143 144
144class (Field a, Arbitrary a, Element (RealOf a), Random (RealOf a)) => ArbitraryField a 145class (Field a, Arbitrary a, Storable (RealOf a), Random (RealOf a)) => ArbitraryField a
145instance ArbitraryField Double 146instance ArbitraryField Double
146instance ArbitraryField (Complex Double) 147instance ArbitraryField (Complex Double)
147 148