1. Bryan O'Sullivan
  2. mysql


Bryan O'Sullivan  committed b806654

Tidy up imports.

  • Participants
  • Parent commits 5e80e82
  • Branches default

Comments (0)

Files changed (3)

File Database/MySQL/Base.hs

View file
  • Ignore whitespace
     , clientVersion
     ) where
+import Control.Applicative ((<$>), (<*>))
+import Control.Exception (Exception, throw)
+import Control.Monad (forM_, unless, when)
 import Data.ByteString.Char8 ()
-import Data.ByteString.Internal
-import Data.ByteString.Unsafe
+import Data.ByteString.Internal (ByteString, create, createAndTrim, memcpy)
+import Data.ByteString.Unsafe (unsafeUseAsCStringLen)
+import Data.IORef (IORef, atomicModifyIORef, newIORef, readIORef, writeIORef)
+import Data.Int (Int64)
+import Data.List (foldl')
+import Data.Typeable (Typeable)
+import Data.Word (Word, Word16)
+import Database.MySQL.Base.C
 import Database.MySQL.Base.Types
-import System.Mem.Weak
-import Data.List    
-import Control.Applicative
-import Data.Int
-import Data.Typeable (Typeable)
-import Control.Exception
-import Control.Monad
-import Database.MySQL.Base.C
-import System.IO.Unsafe
-import Data.IORef
-import Data.Word
-import Foreign.C.String
-import Foreign.C.Types
+import Foreign.C.String (CString, peekCString, withCString)
+import Foreign.C.Types (CULong)
+import Foreign.Concurrent (newForeignPtr)
 import Foreign.ForeignPtr hiding (newForeignPtr)
-import Foreign.Concurrent
-import Foreign.Marshal.Array
-import Foreign.Ptr
+import Foreign.Marshal.Array (peekArray)
+import Foreign.Ptr (Ptr, castPtr, nullPtr)
+import System.IO.Unsafe (unsafePerformIO)
+import System.Mem.Weak (Weak, deRefWeak, mkWeakPtr)
 -- $mgmt

File Database/MySQL/Base/C.hsc

View file
  • Ignore whitespace
 #include "mysql.h"
 #include <signal.h>
-import Database.MySQL.Base.Types
 import Control.Concurrent (rtsSupportsBoundThreads, runInBoundThread)
 import Control.Exception (finally)
-import Foreign.C.Types
+import Data.ByteString.Unsafe (unsafeUseAsCString)
+import Database.MySQL.Base.Types
+import Foreign.C.String (CString, withCString)
+import Foreign.C.Types (CInt, CUInt, CULLong, CULong)
 import Foreign.ForeignPtr (ForeignPtr, mallocForeignPtr, withForeignPtr)
+import Foreign.Marshal.Utils (with)
 import Foreign.Ptr (Ptr, nullPtr)
+import Foreign.Storable (Storable(..))
 import System.IO.Unsafe (unsafePerformIO)
-import Foreign.Storable
-import Foreign.Marshal.Utils
-import Data.ByteString.Unsafe
-import Foreign.C.String
 -- | Execute an 'IO' action with signals used by GHC's runtime signals
 -- blocked.  The @mysqlclient@ C library does not correctly restart

File Database/MySQL/Base/Types.hsc

View file
  • Ignore whitespace
 #include "mysql.h"
-import Data.Monoid
-import Data.Bits
-import Data.List
-import Control.Applicative
-import Data.Maybe
+import Control.Applicative ((<$>), (<*>), pure)
+import Data.Bits ((.|.), (.&.))
+import Data.ByteString hiding (intercalate)
+import Data.ByteString.Internal (create, memcpy)
+import Data.List (intercalate)
+import Data.Maybe (catMaybes)
+import Data.Monoid (Monoid(..))
+import Data.Typeable (Typeable)
+import Data.Word (Word, Word8)
+import Foreign.C.Types (CChar, CInt, CUInt, CULong)
+import Foreign.Ptr (Ptr)
+import Foreign.Storable (Storable(..), peekByteOff)
 import qualified Data.IntMap as IntMap
-import Foreign.C.Types
-import Foreign.Ptr (Ptr)
-import Foreign.Storable
-import Data.Typeable (Typeable)
-import Data.ByteString hiding (intercalate)
-import Data.ByteString.Internal
-import Data.Word
 data MYSQL