summaryrefslogtreecommitdiff
path: root/packages/tests
diff options
context:
space:
mode:
authorSidharth Kapur <sidharthkapur1@gmail.com>2016-03-13 17:28:08 -0500
committerSidharth Kapur <sidharthkapur1@gmail.com>2016-03-13 17:28:08 -0500
commit7a861a58211a0fb020dca2db2767de24538648b7 (patch)
treeaed5d4b4cd9523c8327764a2f097db4394897a69 /packages/tests
parent91e9c879bfa3b509cd737ba31580cbba0c0bf340 (diff)
Simplify test code
Diffstat (limited to 'packages/tests')
-rw-r--r--packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs17
1 files changed, 6 insertions, 11 deletions
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
index 23d7e6f..3211877 100644
--- a/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
+++ b/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
@@ -30,7 +30,7 @@ import Control.Monad(replicateM)
30import Test.QuickCheck(Arbitrary,arbitrary,choose,vector,sized,shrink) 30import Test.QuickCheck(Arbitrary,arbitrary,choose,vector,sized,shrink)
31 31
32import GHC.TypeLits 32import GHC.TypeLits
33import Data.Proxy (Proxy) 33import Data.Proxy (Proxy(..))
34import qualified Numeric.LinearAlgebra.Static as Static 34import qualified Numeric.LinearAlgebra.Static as Static
35 35
36 36
@@ -82,17 +82,12 @@ instance (KnownNat n, KnownNat m) => Arbitrary (Static.L m n) where
82 l <- vector (m * n) 82 l <- vector (m * n)
83 return (Static.fromList l) 83 return (Static.fromList l)
84 84
85 where proxyM :: Proxy m 85 where
86 proxyM = proxyM 86 m :: Int
87 m = fromIntegral (natVal (Proxy :: Proxy m))
87 88
88 proxyN :: Proxy n 89 n :: Int
89 proxyN = proxyN 90 n = fromIntegral (natVal (Proxy :: Proxy n))
90
91 m :: Int
92 m = fromIntegral (natVal proxyM)
93
94 n :: Int
95 n = fromIntegral (natVal proxyN)
96 91
97 shrink mat = [] 92 shrink mat = []
98 93