diff options
Diffstat (limited to 'lib/Data/Packed/Internal/Common.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Common.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Data/Packed/Internal/Common.hs b/lib/Data/Packed/Internal/Common.hs index 3609bc2..bce9922 100644 --- a/lib/Data/Packed/Internal/Common.hs +++ b/lib/Data/Packed/Internal/Common.hs | |||
@@ -80,9 +80,14 @@ errorCode 2006 = "the input matrix is not positive definite" | |||
80 | errorCode 2007 = "not yet supported in this OS" | 80 | errorCode 2007 = "not yet supported in this OS" |
81 | errorCode n = "code "++show n | 81 | errorCode n = "code "++show n |
82 | 82 | ||
83 | |||
84 | -- | clear the fpu | ||
85 | foreign import ccall "auxi.h asm_finit" finit :: IO () | ||
86 | |||
83 | -- | check the error code | 87 | -- | check the error code |
84 | check :: String -> IO CInt -> IO () | 88 | check :: String -> IO CInt -> IO () |
85 | check msg f = do | 89 | check msg f = do |
90 | finit | ||
86 | err <- f | 91 | err <- f |
87 | when (err/=0) $ if err > 1024 | 92 | when (err/=0) $ if err > 1024 |
88 | then (error (msg++": "++errorCode err)) -- our errors | 93 | then (error (msg++": "++errorCode err)) -- our errors |