From 7a861a58211a0fb020dca2db2767de24538648b7 Mon Sep 17 00:00:00 2001 From: Sidharth Kapur Date: Sun, 13 Mar 2016 17:28:08 -0500 Subject: Simplify test code --- .../tests/src/Numeric/LinearAlgebra/Tests/Instances.hs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs') 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) import Test.QuickCheck(Arbitrary,arbitrary,choose,vector,sized,shrink) import GHC.TypeLits -import Data.Proxy (Proxy) +import Data.Proxy (Proxy(..)) import qualified Numeric.LinearAlgebra.Static as Static @@ -82,17 +82,12 @@ instance (KnownNat n, KnownNat m) => Arbitrary (Static.L m n) where l <- vector (m * n) return (Static.fromList l) - where proxyM :: Proxy m - proxyM = proxyM + where + m :: Int + m = fromIntegral (natVal (Proxy :: Proxy m)) - proxyN :: Proxy n - proxyN = proxyN - - m :: Int - m = fromIntegral (natVal proxyM) - - n :: Int - n = fromIntegral (natVal proxyN) + n :: Int + n = fromIntegral (natVal (Proxy :: Proxy n)) shrink mat = [] -- cgit v1.2.3