git.iko.soy/typeable/postgresql-simple
on master help sign in
Stop using quasiquotes in Simple.hs

For some reason this was causing haddock to fail. This may be a bug in cabal-install or ghci and is worth further investigation at some point. For example $ cabal haddock Running Haddock for postgresql-simple-0.3.0.0... Warning: The documentation for the following packages are not installed. No links will be generated to these packages: rts-1.0 Preprocessing library postgresql-simple-0.3.0.0... Haddock coverage: 2% ( 1 / 49) in 'Database.PostgreSQL.Simple.TypeInfo' 8% ( 4 / 50) in 'Database.PostgreSQL.Simple.Time.Implementation' 9% ( 1 / 11) in 'Database.PostgreSQL.Simple.Time.Internal' 4% ( 1 / 26) in 'Database.PostgreSQL.Simple.Time' 80% ( 8 / 10) in 'Database.PostgreSQL.Simple.Arrays' 100% ( 2 / 2) in 'Database.PostgreSQL.Simple.SqlQQ' 88% ( 7 / 8) in 'Database.PostgreSQL.Simple.Types' 100% ( 4 / 4) in 'Database.PostgreSQL.Simple.ToField' 100% ( 2 / 2) in 'Database.PostgreSQL.Simple.ToRow' 67% ( 2 / 3) in 'Database.PostgreSQL.Simple.Ok' dist/build/tmp-15448/src/Database/PostgreSQL/Simple/Internal.hs:44:1: Warning: The import of `System.IO.Unsafe' is redundant except perhaps to import instances from `System.IO.Unsafe' To import instances alone, use: import System.IO.Unsafe() 38% ( 9 / 24) in 'Database.PostgreSQL.Simple.Internal' 22% ( 4 / 18) in 'Database.PostgreSQL.Simple.LargeObjects' 75% ( 3 / 4) in 'Database.PostgreSQL.Simple.Notification' 80% ( 4 / 5) in 'Database.PostgreSQL.Simple.Errors' 100% ( 3 / 3) in 'Database.PostgreSQL.Simple.Compat' 17% ( 1 / 6) in 'Database.PostgreSQL.Simple.BuiltinTypes' 79% ( 11 / 14) in 'Database.PostgreSQL.Simple.FromField' 33% ( 2 / 6) in 'Database.PostgreSQL.Simple.FromRow' ByteCodeLink.lookupCE During interactive linking, GHCi couldn't find the following symbol: postgresqlzmsimplezm0zi3zi0zi0_DatabaseziPostgreSQLziSimpleziSqlQQ_sql_closure This may be due to you not asking GHCi to load extra object files, archives or DLLs needed by your current session. Restart GHCi, specifying the missing library using the -L/path/to/object/dir and -lmissinglibname flags, or simply by naming the relevant files on the GHCi command line. Alternatively, this link failure might indicate a bug in GHCi. If you suspect the latter, please send a bug report to: glasgow-haskell-bugs@haskell.org

commitaaa12f3cc05fb51aadbdb3c8c3cb693f1212d14d authorLeon P Smith <leon@melding-monads.com> dateSun 27 Jan 2013, 15:49 (14 years ago) parent72e419e
1 file changed+5−8
src/Database/PostgreSQL/Simple.hs+5−8
src/Database/PostgreSQL/Simple.hs+5−8
@@ -4,7 +4,6 @@
44{-# LANGUAGE PatternGuards #-}
55{-# LANGUAGE RecordWildCards #-}
66{-# LANGUAGE ViewPatterns #-}
7−{-# LANGUAGE QuasiQuotes #-}
87
98------------------------------------------------------------------------------
109-- |
@@ -145,7 +144,6 @@ import Database.PostgreSQL.Simple.ToRow (ToRow(..))
145144import Database.PostgreSQL.Simple.Types
146145 ( Binary(..), In(..), Only(..), Query(..), (:.)(..) )
147146import Database.PostgreSQL.Simple.Internal as Base
148−import Database.PostgreSQL.Simple.SqlQQ (sql)
149147import qualified Database.PostgreSQL.LibPQ as PQ
150148import qualified Data.ByteString.Char8 as B
151149import qualified Data.Text as T
@@ -1035,12 +1033,11 @@ getTypeInfo conn@Connection{..} oid =
10351033 case IntMap.lookup (oid2int oid) oidmap of
10361034 Just typeinfo -> return (oidmap, typeinfo)
10371035 Nothing -> do
1038− names <- query conn
1039− [sql| SELECT p.oid, p.typname, c.oid, c.typname
1040− FROM pg_type AS p LEFT OUTER JOIN pg_type AS c
1041− ON c.oid = p.typelem
1042− WHERE p.oid = ?
1043− |] (Only oid)
1036+ names <- query conn "SELECT p.oid, p.typname, c.oid, c.typname\
1037+ \ FROM pg_type AS p LEFT OUTER JOIN pg_type AS c\
1038+ \ ON c.oid = p.typelem\
1039+ \ WHERE p.oid = ?"
1040+ (Only oid)
10441041 typinf <- case names of
10451042 [] -> return $ throw (fatalError "invalid type oid")
10461043 [(pOid, pTypName, mbCOid, mbCTypName)] ->