summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hmatrix.cabal6
-rw-r--r--lib/Data/Packed/Internal/Common.hs4
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 @@
1Name: hmatrix 1Name: hmatrix
2Version: 0.5.1.0 2Version: 0.5.1.1
3License: GPL 3License: GPL
4License-file: LICENSE 4License-file: LICENSE
5Author: Alberto Ruiz 5Author: 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.
13Category: Math 13Category: Math
14tested-with: GHC ==6.10.1 14tested-with: GHC ==6.10.2
15 15
16cabal-version: >=1.2 16cabal-version: >=1.2
17build-type: Simple 17build-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
88check :: String -> IO CInt -> IO () 88check :: String -> IO CInt -> IO ()
89check msg f = do 89check 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