diff options
-rw-r--r-- | hmatrix.cabal | 6 | ||||
-rw-r--r-- | lib/Data/Packed/Internal/Common.hs | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/hmatrix.cabal b/hmatrix.cabal index c1b4e01..b283bca 100644 --- a/hmatrix.cabal +++ b/hmatrix.cabal | |||
@@ -1,5 +1,5 @@ | |||
1 | Name: hmatrix | 1 | Name: hmatrix |
2 | Version: 0.5.1.0 | 2 | Version: 0.5.1.1 |
3 | License: GPL | 3 | License: GPL |
4 | License-file: LICENSE | 4 | License-file: LICENSE |
5 | Author: Alberto Ruiz | 5 | Author: Alberto Ruiz |
@@ -11,7 +11,7 @@ Description: This library provides a purely functional interface to basic | |||
11 | and other numerical computations, internally implemented using | 11 | and other numerical computations, internally implemented using |
12 | GSL, BLAS and LAPACK. | 12 | GSL, BLAS and LAPACK. |
13 | Category: Math | 13 | Category: Math |
14 | tested-with: GHC ==6.10.1 | 14 | tested-with: GHC ==6.10.2 |
15 | 15 | ||
16 | cabal-version: >=1.2 | 16 | cabal-version: >=1.2 |
17 | build-type: Simple | 17 | build-type: Simple |
@@ -109,6 +109,8 @@ library | |||
109 | if flag(unsafe) | 109 | if flag(unsafe) |
110 | cpp-options: -DUNSAFE | 110 | cpp-options: -DUNSAFE |
111 | 111 | ||
112 | if impl(ghc < 6.10.2) | ||
113 | cpp-options: -DFINIT | ||
112 | 114 | ||
113 | if flag(mkl) | 115 | if flag(mkl) |
114 | if arch(x86_64) | 116 | if arch(x86_64) |
diff --git a/lib/Data/Packed/Internal/Common.hs b/lib/Data/Packed/Internal/Common.hs index 46e9612..2310f5f 100644 --- a/lib/Data/Packed/Internal/Common.hs +++ b/lib/Data/Packed/Internal/Common.hs | |||
@@ -1,4 +1,4 @@ | |||
1 | {-# OPTIONS_GHC -fglasgow-exts #-} | 1 | {-# LANGUAGE CPP #-} |
2 | ----------------------------------------------------------------------------- | 2 | ----------------------------------------------------------------------------- |
3 | -- | | 3 | -- | |
4 | -- Module : Data.Packed.Internal.Common | 4 | -- Module : Data.Packed.Internal.Common |
@@ -87,7 +87,9 @@ foreign import ccall "asm_finit" finit :: IO () | |||
87 | -- | check the error code | 87 | -- | check the error code |
88 | check :: String -> IO CInt -> IO () | 88 | check :: String -> IO CInt -> IO () |
89 | check msg f = do | 89 | check msg f = do |
90 | #if FINIT | ||
90 | finit | 91 | finit |
92 | #endif | ||
91 | err <- f | 93 | err <- f |
92 | when (err/=0) $ if err > 1024 | 94 | when (err/=0) $ if err > 1024 |
93 | then (error (msg++": "++errorCode err)) -- our errors | 95 | then (error (msg++": "++errorCode err)) -- our errors |