From badcbdfddc4be31fc79a6df4553795af18069efe Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Thu, 8 Aug 2019 02:22:30 -0400 Subject: Removed the Element class. --- packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packages/tests/src') 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 import Numeric.LinearAlgebra.HMatrix hiding (vector) import Control.Monad(replicateM) import Test.QuickCheck(Arbitrary,arbitrary,choose,vector,sized,shrink) +import Foreign.Storable import GHC.TypeLits import Data.Proxy (Proxy(..)) @@ -69,7 +70,7 @@ instance KnownNat n => Arbitrary (Static.R n) where shrink _v = [] -instance (Element a, Arbitrary a) => Arbitrary (Matrix a) where +instance (Storable a, Arbitrary a) => Arbitrary (Matrix a) where arbitrary = do m <- chooseDim n <- chooseDim @@ -98,7 +99,7 @@ instance (KnownNat n, KnownNat m) => Arbitrary (Static.L m n) where -- a square matrix newtype (Sq a) = Sq (Matrix a) deriving Show -instance (Element a, Arbitrary a) => Arbitrary (Sq a) where +instance (Storable a, Arbitrary a) => Arbitrary (Sq a) where arbitrary = do n <- chooseDim l <- vector (n*n) @@ -141,7 +142,7 @@ instance (Field a, Arbitrary a, Num (Vector a)) => Arbitrary (Herm a) where return $ sym m' -class (Field a, Arbitrary a, Element (RealOf a), Random (RealOf a)) => ArbitraryField a +class (Field a, Arbitrary a, Storable (RealOf a), Random (RealOf a)) => ArbitraryField a instance ArbitraryField Double instance ArbitraryField (Complex Double) -- cgit v1.2.3