Browse files

Tidy exports; use LANGUAGE pragmas; silence some warnings.

  • Loading branch information...
1 parent 2b55c73 commit fd0f620e10c3e25849f812294853d6bf8a476536 @bos committed Apr 25, 2011
Showing with 10 additions and 7 deletions.
  1. +10 −7 Database/HDBC/MySQL/Connection.hsc
View
17 Database/HDBC/MySQL/Connection.hsc
@@ -1,9 +1,12 @@
--- -*- mode: haskell; -*-
-{-# OPTIONS -fglasgow-exts #-}
+{-# LANGUAGE EmptyDataDecls, ForeignFunctionInterface, ScopedTypeVariables #-}
module Database.HDBC.MySQL.Connection
- (connectMySQL, MySQLConnectInfo(..), defaultMySQLConnectInfo, Connection)
-where
+ (
+ connectMySQL
+ , MySQLConnectInfo(..)
+ , defaultMySQLConnectInfo
+ , Connection
+ ) where
import Control.Exception
import Control.Monad
@@ -122,7 +125,7 @@ connectMySQL info = do
-- HDBC assumes that there is no such thing as auto-commit.
-- So we'll turn it off here and start our first transaction.
- mysql_autocommit mysql_ 0
+ _ <- mysql_autocommit mysql_ 0
mysql__ <- newForeignPtr mysql_close mysql_
doStartTransaction mysql__
@@ -671,7 +674,7 @@ doStartTransaction = doQuery "START TRANSACTION"
doGetTables :: ForeignPtr MYSQL -> IO [String]
doGetTables mysql__ = do
stmt <- newStatement mysql__ "SHOW TABLES"
- Types.execute stmt []
+ _ <- Types.execute stmt []
rows <- unfoldRows stmt
Types.finish stmt
return $ map (fromSql . head) rows
@@ -686,7 +689,7 @@ doGetTables mysql__ = do
doDescribeTable :: ForeignPtr MYSQL -> String -> IO [(String, ColTypes.SqlColDesc)]
doDescribeTable mysql__ table = do
stmt <- newStatement mysql__ ("DESCRIBE " ++ table)
- Types.execute stmt []
+ _ <- Types.execute stmt []
rows <- unfoldRows stmt
Types.finish stmt
return $ map fromRow rows

0 comments on commit fd0f620

Please sign in to comment.