Commits

Bryan O'Sullivan committed 693d7a9

GHC 7.4 compatibility.

Comments (0)

Files changed (2)

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

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)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.