summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Data/Packed/Internal/Common.hs4
1 files changed, 3 insertions, 1 deletions
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