summaryrefslogtreecommitdiff
path: root/packages/tests/src/Numeric/LinearAlgebra/Tests
diff options
context:
space:
mode:
authorDominic Steinitz <dominic@steinitz.org>2018-03-30 12:48:20 +0100
committerDominic Steinitz <dominic@steinitz.org>2018-04-01 12:15:24 +0100
commit1a68793247b8845cefad4d157e4f4d25b1731b42 (patch)
treedaf3add31de83efcc74b41755c2d05c811242ce6 /packages/tests/src/Numeric/LinearAlgebra/Tests
parentd83b17190029c11e3ab8b504e5cdc917f5863120 (diff)
Implement CI
Diffstat (limited to 'packages/tests/src/Numeric/LinearAlgebra/Tests')
-rw-r--r--packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs8
-rw-r--r--packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs5
2 files changed, 9 insertions, 4 deletions
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
index f0bddd0..59230e0 100644
--- a/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
+++ b/packages/tests/src/Numeric/LinearAlgebra/Tests/Instances.hs
@@ -1,4 +1,8 @@
1{-# LANGUAGE CPP, FlexibleContexts, UndecidableInstances, FlexibleInstances, ScopedTypeVariables #-} 1{-# LANGUAGE CPP, FlexibleContexts, UndecidableInstances, FlexibleInstances, ScopedTypeVariables #-}
2
3{-# OPTIONS_GHC -fno-warn-orphans #-}
4{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
5
2----------------------------------------------------------------------------- 6-----------------------------------------------------------------------------
3{- | 7{- |
4Module : Numeric.LinearAlgebra.Tests.Instances 8Module : Numeric.LinearAlgebra.Tests.Instances
@@ -62,7 +66,7 @@ instance KnownNat n => Arbitrary (Static.R n) where
62 n :: Int 66 n :: Int
63 n = fromIntegral (natVal (Proxy :: Proxy n)) 67 n = fromIntegral (natVal (Proxy :: Proxy n))
64 68
65 shrink v = [] 69 shrink _v = []
66 70
67instance (Element a, Arbitrary a) => Arbitrary (Matrix a) where 71instance (Element a, Arbitrary a) => Arbitrary (Matrix a) where
68 arbitrary = do 72 arbitrary = do
@@ -89,7 +93,7 @@ instance (KnownNat n, KnownNat m) => Arbitrary (Static.L m n) where
89 n :: Int 93 n :: Int
90 n = fromIntegral (natVal (Proxy :: Proxy n)) 94 n = fromIntegral (natVal (Proxy :: Proxy n))
91 95
92 shrink mat = [] 96 shrink _mat = []
93 97
94-- a square matrix 98-- a square matrix
95newtype (Sq a) = Sq (Matrix a) deriving Show 99newtype (Sq a) = Sq (Matrix a) deriving Show
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs
index e3a6242..6cd3a9e 100644
--- a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs
+++ b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs
@@ -3,6 +3,8 @@
3{-# LANGUAGE TypeFamilies #-} 3{-# LANGUAGE TypeFamilies #-}
4{-# LANGUAGE DataKinds #-} 4{-# LANGUAGE DataKinds #-}
5 5
6{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
7
6----------------------------------------------------------------------------- 8-----------------------------------------------------------------------------
7{- | 9{- |
8Module : Numeric.LinearAlgebra.Tests.Properties 10Module : Numeric.LinearAlgebra.Tests.Properties
@@ -51,14 +53,13 @@ module Numeric.LinearAlgebra.Tests.Properties (
51 , staticVectorBinaryFailProp 53 , staticVectorBinaryFailProp
52) where 54) where
53 55
54import Numeric.LinearAlgebra.HMatrix hiding (Testable,unitary) 56import Numeric.LinearAlgebra.HMatrix hiding (Testable)
55import qualified Numeric.LinearAlgebra.Static as Static 57import qualified Numeric.LinearAlgebra.Static as Static
56import Test.QuickCheck 58import Test.QuickCheck
57 59
58import Data.Binary 60import Data.Binary
59import Data.Binary.Get (runGet) 61import Data.Binary.Get (runGet)
60import Data.Either (isLeft) 62import Data.Either (isLeft)
61import Debug.Trace (traceShowId)
62#if MIN_VERSION_base(4,11,0) 63#if MIN_VERSION_base(4,11,0)
63import Prelude hiding ((<>)) 64import Prelude hiding ((<>))
64#endif 65#endif