Skip to content
This repository
Browse code

Add explicit dependency on Convertible for toplevel type signature.

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

0 comments on commit 5bd4ee1

Please sign in to comment.
Something went wrong with that request. Please try again.