Browse files

Add explicit dependency on Convertible for toplevel type signature.

  • Loading branch information...
1 parent 096e5b4 commit 5bd4ee16f7ad4dbef0300e716e573b44ff7fb8e7 @zenzike zenzike committed Mar 3, 2012
Showing with 4 additions and 1 deletion.
  1. +3 −0 Database/HDBC/PostgreSQL/Connection.hsc
  2. +1 −1 HDBC-postgresql.cabal
View
3 Database/HDBC/PostgreSQL/Connection.hsc
@@ -1,6 +1,7 @@
-- -*- mode: haskell; -*-
{-# CFILES hdbc-postgresql-helper.c #-}
-- Above line for hugs
+{-# LANGUAGE FlexibleContexts #-}
module Database.HDBC.PostgreSQL.Connection
(connectPostgreSQL, withPostgreSQL,
@@ -28,6 +29,7 @@ import Control.Concurrent.MVar
import System.IO (stderr, hPutStrLn)
import System.IO.Unsafe (unsafePerformIO)
import Control.Exception(bracket)
+import Data.Convertible (Convertible)
#include <libpq-fe.h>
#include <pg_config.h>
@@ -137,6 +139,7 @@ frollback :: Bool -> Conn -> ChildList -> IO ()
frollback begin o cl = do _ <- frun o cl "ROLLBACK" []
when begin $ begin_transaction o cl
+fgetTables :: (Convertible SqlValue a) => Conn -> ChildList -> IO [a]
fgetTables conn children =
do sth <- newSth conn children
"select table_name from information_schema.tables where \
View
2 HDBC-postgresql.cabal
@@ -37,7 +37,7 @@ Library
Database.HDBC.PostgreSQL.ErrorCodes
Extensions: ExistentialQuantification, ForeignFunctionInterface
Build-Depends: base >= 3 && < 5, mtl, HDBC>=2.2.0, parsec, utf8-string,
- bytestring, old-time, old-locale, time
+ bytestring, old-time, old-locale, time, convertible
if impl(ghc >= 6.9)
Build-Depends: base >= 4
Extra-Libraries: pq

0 comments on commit 5bd4ee1

Please sign in to comment.