Skip to content

Commit

Permalink
GHC 7.4 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
bos committed Feb 12, 2012
1 parent 94c71e4 commit 16e0668
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Database/MySQL/Base.hs
Expand Up @@ -554,7 +554,7 @@ withMaybeString :: Maybe String -> (CString -> IO a) -> IO a
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 #-}

Expand Down
6 changes: 5 additions & 1 deletion Database/MySQL/Base/C.hsc
@@ -1,4 +1,4 @@
{-# LANGUAGE EmptyDataDecls, ForeignFunctionInterface #-}
{-# LANGUAGE CPP, EmptyDataDecls, ForeignFunctionInterface #-}

-- |
-- Module: Database.MySQL.Base.C
Expand Down Expand Up @@ -71,7 +71,11 @@ 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)

Expand Down

0 comments on commit 16e0668

Please sign in to comment.