From e282d2b4c5f389941225d02df94e7baf38c4f38e Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Thu, 9 Apr 2015 19:46:53 +0200 Subject: update hmatrix-tests for ghc-7.10 --- packages/tests/src/Numeric/LinearAlgebra/Tests.hs | 7 ++++++- packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'packages/tests') 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 @@ {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-incomplete-patterns #-} {-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE RankNTypes #-} ----------------------------------------------------------------------------- {- | @@ -54,6 +57,7 @@ import Data.Packed.ST import Test.QuickCheck(Arbitrary,arbitrary,coarbitrary,choose,vector ,sized,classify,Testable,Property ,quickCheckWithResult,maxSize,stdArgs,shrink) +import qualified Test.QuickCheck as T import Test.QuickCheck.Test(isSuccess) @@ -415,7 +419,8 @@ indexProp g f x = a1 == g a2 && a2 == a3 && b1 == g b2 && b2 == b3 runTests :: Int -- ^ maximum dimension -> IO () runTests n = do - let test p = qCheck n p + let test :: forall t . T.Testable t => t -> IO () + test p = qCheck n p putStrLn "------ index" test( \m -> indexProp id flatten (single (m :: RM)) ) 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 @@ {-# LANGUAGE CPP, FlexibleContexts #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# LANGUAGE TypeFamilies #-} + ----------------------------------------------------------------------------- {- | Module : Numeric.LinearAlgebra.Tests.Properties -- cgit v1.2.3