summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-01-08 13:54:23 +0100
committerAlberto Ruiz <aruiz@um.es>2015-01-08 13:54:23 +0100
commit8878aaaf649962f4360a94109a674da756ad2202 (patch)
treed131b381c200796715b14a6eda1d0ae001032777 /packages
parent432d80a0b65b0be64fe0dc0d7816f1f738895458 (diff)
update base to ghc-7.10
Diffstat (limited to 'packages')
-rw-r--r--packages/base/hmatrix.cabal34
-rw-r--r--packages/base/src/Data/Packed/Internal/Numeric.hs1
-rw-r--r--packages/base/src/Data/Packed/Internal/Vector.hs1
-rw-r--r--packages/base/src/Data/Packed/Numeric.hs1
-rw-r--r--packages/base/src/Numeric/Chain.hs2
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Algorithms.hs5
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Static.hs5
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Util/CG.hs6
8 files changed, 24 insertions, 31 deletions
diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal
index 8ba3e06..f5384f3 100644
--- a/packages/base/hmatrix.cabal
+++ b/packages/base/hmatrix.cabal
@@ -1,5 +1,5 @@
1Name: hmatrix 1Name: hmatrix
2Version: 0.16.1.3 2Version: 0.17.0.0
3License: BSD3 3License: BSD3
4License-file: LICENSE 4License-file: LICENSE
5Author: Alberto Ruiz 5Author: Alberto Ruiz
@@ -38,7 +38,7 @@ flag openblas
38 38
39library 39library
40 40
41 Build-Depends: base >= 4 && < 5, 41 Build-Depends: base >= 4.8 && < 5,
42 binary, 42 binary,
43 array, 43 array,
44 deepseq, 44 deepseq,
@@ -50,27 +50,19 @@ library
50 50
51 hs-source-dirs: src 51 hs-source-dirs: src
52 52
53 exposed-modules: Data.Packed, 53 exposed-modules: Numeric.LinearAlgebra.Devel
54 Data.Packed.Vector,
55 Data.Packed.Matrix,
56 Data.Packed.Foreign,
57 Data.Packed.ST,
58 Data.Packed.Development,
59
60 Numeric.LinearAlgebra
61 Numeric.LinearAlgebra.LAPACK
62 Numeric.LinearAlgebra.Algorithms
63 Numeric.Container
64 Numeric.LinearAlgebra.Util
65
66 Numeric.LinearAlgebra.Devel
67 Numeric.LinearAlgebra.Data 54 Numeric.LinearAlgebra.Data
68 Numeric.LinearAlgebra.HMatrix 55 Numeric.LinearAlgebra.HMatrix
69 Numeric.LinearAlgebra.Static 56 Numeric.LinearAlgebra.Static
70 57 Numeric.LinearAlgebra.Util
71
72 58
73 other-modules: Data.Packed.Internal, 59 other-modules: Data.Packed,
60 Data.Packed.Vector
61 Data.Packed.Matrix
62 Data.Packed.Foreign
63 Data.Packed.ST
64 Data.Packed.Development
65 Data.Packed.Internal
74 Data.Packed.Internal.Common 66 Data.Packed.Internal.Common
75 Data.Packed.Internal.Signatures 67 Data.Packed.Internal.Signatures
76 Data.Packed.Internal.Vector 68 Data.Packed.Internal.Vector
@@ -82,6 +74,10 @@ library
82 Numeric.Matrix 74 Numeric.Matrix
83 Data.Packed.Internal.Numeric 75 Data.Packed.Internal.Numeric
84 Data.Packed.Numeric 76 Data.Packed.Numeric
77 Numeric.LinearAlgebra
78 Numeric.LinearAlgebra.LAPACK
79 Numeric.LinearAlgebra.Algorithms
80 Numeric.Container
85 Numeric.LinearAlgebra.Util.Convolution 81 Numeric.LinearAlgebra.Util.Convolution
86 Numeric.LinearAlgebra.Util.CG 82 Numeric.LinearAlgebra.Util.CG
87 Numeric.LinearAlgebra.Random 83 Numeric.LinearAlgebra.Random
diff --git a/packages/base/src/Data/Packed/Internal/Numeric.hs b/packages/base/src/Data/Packed/Internal/Numeric.hs
index 9adc023..dc5724d 100644
--- a/packages/base/src/Data/Packed/Internal/Numeric.hs
+++ b/packages/base/src/Data/Packed/Internal/Numeric.hs
@@ -48,7 +48,6 @@ import Numeric.Conversion
48import Data.Packed.Development 48import Data.Packed.Development
49import Numeric.Vectorized 49import Numeric.Vectorized
50import Data.Complex 50import Data.Complex
51import Control.Applicative((<*>))
52 51
53import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ) 52import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ)
54import Data.Packed.Internal 53import Data.Packed.Internal
diff --git a/packages/base/src/Data/Packed/Internal/Vector.hs b/packages/base/src/Data/Packed/Internal/Vector.hs
index d0bc143..b49f379 100644
--- a/packages/base/src/Data/Packed/Internal/Vector.hs
+++ b/packages/base/src/Data/Packed/Internal/Vector.hs
@@ -35,7 +35,6 @@ import Foreign.Ptr(Ptr)
35import Foreign.Storable(Storable, peekElemOff, pokeElemOff, sizeOf) 35import Foreign.Storable(Storable, peekElemOff, pokeElemOff, sizeOf)
36import Foreign.C.Types 36import Foreign.C.Types
37import Data.Complex 37import Data.Complex
38import Control.Monad(when)
39import System.IO.Unsafe(unsafePerformIO) 38import System.IO.Unsafe(unsafePerformIO)
40 39
41#if __GLASGOW_HASKELL__ >= 605 40#if __GLASGOW_HASKELL__ >= 605
diff --git a/packages/base/src/Data/Packed/Numeric.hs b/packages/base/src/Data/Packed/Numeric.hs
index 6027f43..b2395f2 100644
--- a/packages/base/src/Data/Packed/Numeric.hs
+++ b/packages/base/src/Data/Packed/Numeric.hs
@@ -71,7 +71,6 @@ import Data.Packed
71import Data.Packed.Internal.Numeric 71import Data.Packed.Internal.Numeric
72import Data.Complex 72import Data.Complex
73import Numeric.LinearAlgebra.Algorithms(Field,linearSolveSVD) 73import Numeric.LinearAlgebra.Algorithms(Field,linearSolveSVD)
74import Data.Monoid(Monoid(mconcat))
75import Data.Packed.IO 74import Data.Packed.IO
76import Numeric.LinearAlgebra.Random 75import Numeric.LinearAlgebra.Random
77 76
diff --git a/packages/base/src/Numeric/Chain.hs b/packages/base/src/Numeric/Chain.hs
index 4c497f0..55e2df6 100644
--- a/packages/base/src/Numeric/Chain.hs
+++ b/packages/base/src/Numeric/Chain.hs
@@ -1,3 +1,5 @@
1{-# LANGUAGE FlexibleContexts #-}
2
1----------------------------------------------------------------------------- 3-----------------------------------------------------------------------------
2-- | 4-- |
3-- Module : Numeric.Chain 5-- Module : Numeric.Chain
diff --git a/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs b/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs
index 02ac6a0..a113d48 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Algorithms.hs
@@ -935,10 +935,9 @@ relativeError' x y = dig (norm (x `sub` y) / norm x)
935 dig r = round $ -logBase 10 (realToFrac r :: Double) 935 dig r = round $ -logBase 10 (realToFrac r :: Double)
936 936
937 937
938relativeError :: (Normed c t, Num (c t)) => NormType -> c t -> c t -> Double 938relativeError :: Num a => (a -> Double) -> a -> a -> Double
939relativeError t a b = realToFrac r 939relativeError norm a b = r
940 where 940 where
941 norm = pnorm t
942 na = norm a 941 na = norm a
943 nb = norm b 942 nb = norm b
944 nab = norm (a-b) 943 nab = norm (a-b)
diff --git a/packages/base/src/Numeric/LinearAlgebra/Static.hs b/packages/base/src/Numeric/LinearAlgebra/Static.hs
index cc5eb4f..a26cc4c 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Static.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Static.hs
@@ -13,7 +13,6 @@
13{-# LANGUAGE TypeOperators #-} 13{-# LANGUAGE TypeOperators #-}
14{-# LANGUAGE ViewPatterns #-} 14{-# LANGUAGE ViewPatterns #-}
15{-# LANGUAGE GADTs #-} 15{-# LANGUAGE GADTs #-}
16{-# LANGUAGE OverlappingInstances #-}
17{-# LANGUAGE TypeFamilies #-} 16{-# LANGUAGE TypeFamilies #-}
18 17
19 18
@@ -184,8 +183,8 @@ a ¦ b = tr (tr a —— tr b)
184type Sq n = L n n 183type Sq n = L n n
185--type CSq n = CL n n 184--type CSq n = CL n n
186 185
187type GL = (KnownNat n, KnownNat m) => L m n 186type GL = forall n m . (KnownNat n, KnownNat m) => L m n
188type GSq = KnownNat n => Sq n 187type GSq = forall n . KnownNat n => Sq n
189 188
190isKonst :: forall m n . (KnownNat m, KnownNat n) => L m n -> Maybe (ℝ,(Int,Int)) 189isKonst :: forall m n . (KnownNat m, KnownNat n) => L m n -> Maybe (ℝ,(Int,Int))
191isKonst s@(unwrap -> x) 190isKonst s@(unwrap -> x)
diff --git a/packages/base/src/Numeric/LinearAlgebra/Util/CG.hs b/packages/base/src/Numeric/LinearAlgebra/Util/CG.hs
index b82c74f..899a5bf 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Util/CG.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Util/CG.hs
@@ -9,7 +9,7 @@ module Numeric.LinearAlgebra.Util.CG(
9import Data.Packed.Numeric 9import Data.Packed.Numeric
10import Numeric.Sparse 10import Numeric.Sparse
11import Numeric.Vector() 11import Numeric.Vector()
12import Numeric.LinearAlgebra.Algorithms(linearSolveLS, relativeError, NormType(..)) 12import Numeric.LinearAlgebra.Algorithms(linearSolveLS, relativeError, pnorm, NormType(..))
13import Control.Arrow((***)) 13import Control.Arrow((***))
14 14
15{- 15{-
@@ -142,13 +142,13 @@ instance Testable GMatrix
142 print s3; print d3 142 print s3; print d3
143 print s4; print d4 143 print s4; print d4
144 print s5; print d5 144 print s5; print d5
145 print $ relativeError Infinity s5 d5 145 print $ relativeError (pnorm Infinity) s5 d5
146 146
147 ok = s1==d1 147 ok = s1==d1
148 && s2==d2 148 && s2==d2
149 && s3==d3 149 && s3==d3
150 && s4==d4 150 && s4==d4
151 && relativeError Infinity s5 d5 < 1E-10 151 && relativeError (pnorm Infinity) s5 d5 < 1E-10
152 152
153 disp = putStr . dispf 2 153 disp = putStr . dispf 2
154 154