git.iko.soy/typeable/postgresql-simple
on master help sign in
Add Eq and Typeable instances for Connection
f70668aLeon P Smith
src/Database/PostgreSQL/Simple/Internal.hs+4−1
@@ -75,7 +75,10 @@ data Connection = Connection {
75 connectionHandle :: {-# UNPACK #-} !(MVar PQ.Connection)
75 connectionHandle :: {-# UNPACK #-} !(MVar PQ.Connection)
76 , connectionObjects :: {-# UNPACK #-} !(MVar TypeInfoCache)
76 , connectionObjects :: {-# UNPACK #-} !(MVar TypeInfoCache)
77 , connectionTempNameCounter :: {-# UNPACK #-} !(IORef Int64)
77 , connectionTempNameCounter :: {-# UNPACK #-} !(IORef Int64)
78− }
78+ } deriving (Typeable)
79+
80+instance Eq Connection where
81+ x == y = connectionHandle x == connectionHandle y
79
82
80data SqlError = SqlError {
83data SqlError = SqlError {
81 sqlState :: ByteString
84 sqlState :: ByteString