summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-04-09 19:46:53 +0200
committerAlberto Ruiz <aruiz@um.es>2015-04-09 19:46:53 +0200
commite282d2b4c5f389941225d02df94e7baf38c4f38e (patch)
treee304cea691c75a4922d286654680241f5743ce79 /packages
parent8d7c921bdff0d57a4579d3de71cd5ba3bf5276a1 (diff)
update hmatrix-tests for ghc-7.10
Diffstat (limited to 'packages')
-rw-r--r--packages/tests/src/Numeric/LinearAlgebra/Tests.hs7
-rw-r--r--packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs2
2 files changed, 8 insertions, 1 deletions
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs
index 8587561..713af79 100644
--- a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs
+++ b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs
@@ -1,6 +1,9 @@
1{-# LANGUAGE CPP #-} 1{-# LANGUAGE CPP #-}
2{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-incomplete-patterns #-} 2{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-incomplete-patterns #-}
3{-# LANGUAGE DataKinds #-} 3{-# LANGUAGE DataKinds #-}
4{-# LANGUAGE TypeFamilies #-}
5{-# LANGUAGE FlexibleContexts #-}
6{-# LANGUAGE RankNTypes #-}
4 7
5----------------------------------------------------------------------------- 8-----------------------------------------------------------------------------
6{- | 9{- |
@@ -54,6 +57,7 @@ import Data.Packed.ST
54import Test.QuickCheck(Arbitrary,arbitrary,coarbitrary,choose,vector 57import Test.QuickCheck(Arbitrary,arbitrary,coarbitrary,choose,vector
55 ,sized,classify,Testable,Property 58 ,sized,classify,Testable,Property
56 ,quickCheckWithResult,maxSize,stdArgs,shrink) 59 ,quickCheckWithResult,maxSize,stdArgs,shrink)
60import qualified Test.QuickCheck as T
57 61
58import Test.QuickCheck.Test(isSuccess) 62import Test.QuickCheck.Test(isSuccess)
59 63
@@ -415,7 +419,8 @@ indexProp g f x = a1 == g a2 && a2 == a3 && b1 == g b2 && b2 == b3
415runTests :: Int -- ^ maximum dimension 419runTests :: Int -- ^ maximum dimension
416 -> IO () 420 -> IO ()
417runTests n = do 421runTests n = do
418 let test p = qCheck n p 422 let test :: forall t . T.Testable t => t -> IO ()
423 test p = qCheck n p
419 putStrLn "------ index" 424 putStrLn "------ index"
420 test( \m -> indexProp id flatten (single (m :: RM)) ) 425 test( \m -> indexProp id flatten (single (m :: RM)) )
421 test( \v -> indexProp id id (single (v :: Vector Double)) ) 426 test( \v -> indexProp id id (single (v :: Vector Double)) )
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs
index 9bdf897..a5c37f4 100644
--- a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs
+++ b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs
@@ -1,5 +1,7 @@
1{-# LANGUAGE CPP, FlexibleContexts #-} 1{-# LANGUAGE CPP, FlexibleContexts #-}
2{-# OPTIONS_GHC -fno-warn-unused-imports #-} 2{-# OPTIONS_GHC -fno-warn-unused-imports #-}
3{-# LANGUAGE TypeFamilies #-}
4
3----------------------------------------------------------------------------- 5-----------------------------------------------------------------------------
4{- | 6{- |
5Module : Numeric.LinearAlgebra.Tests.Properties 7Module : Numeric.LinearAlgebra.Tests.Properties