diff --git a/Database/MySQL/Base.hs b/Database/MySQL/Base.hs
--- a/Database/MySQL/Base.hs
+++ b/Database/MySQL/Base.hs
@@ -554,7 +554,7 @@
 withMaybeString Nothing act = act nullPtr
 withMaybeString (Just xs) act = withCString xs act
 
-check :: Num a => String -> Connection -> a -> IO ()
+check :: (Eq a, Num a) => String -> Connection -> a -> IO ()
 check func conn r = unless (r == 0) $ connectionError func conn
 {-# INLINE check #-}
 
diff --git a/Database/MySQL/Base/C.hsc b/Database/MySQL/Base/C.hsc
--- a/Database/MySQL/Base/C.hsc
+++ b/Database/MySQL/Base/C.hsc
@@ -1,4 +1,4 @@
-{-# LANGUAGE EmptyDataDecls, ForeignFunctionInterface #-}
+{-# LANGUAGE CPP, EmptyDataDecls, ForeignFunctionInterface #-}
 
 -- |
 -- Module:      Database.MySQL.Base.C
@@ -71,7 +71,11 @@
 import Data.ByteString.Unsafe (unsafeUseAsCString)
 import Database.MySQL.Base.Types
 import Foreign.C.String (CString, withCString)
+##if __GLASGOW_HASKELL__ >= 704
+import Foreign.C.Types (CChar(..), CInt(..), CUInt(..), CULLong(..), CULong(..))
+##else
 import Foreign.C.Types (CInt, CUInt, CULLong, CULong)
+##endif
 import Foreign.Marshal.Utils (with)
 import Foreign.Ptr (Ptr, nullPtr)
 
diff --git a/mysql.cabal b/mysql.cabal
--- a/mysql.cabal
+++ b/mysql.cabal
@@ -1,5 +1,5 @@
 name:           mysql
-version:        0.1.1.3
+version:        0.1.1.4
 homepage:       https://github.com/bos/mysql
 bug-reports:    https://github.com/bos/mysql/issues
 synopsis:       A low-level MySQL client library.
