Commits

Bryan O'Sullivan  committed 693d7a9

GHC 7.4 compatibility.

  • Participants
  • Parent commits 54e0431

Comments (0)

Files changed (2)

File Database/MySQL/Base.hs

 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 #-}
 

File Database/MySQL/Base/C.hsc

-{-# LANGUAGE EmptyDataDecls, ForeignFunctionInterface #-}
+{-# LANGUAGE CPP, EmptyDataDecls, ForeignFunctionInterface #-}
 
 -- |
 -- Module:      Database.MySQL.Base.C
 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)