git.iko.soy/typeable/postgresql-simple
on master help sign in
Add Eq and Typeable instances for Connection
commitf70668a894631979202a52a8701c5c3d2b3bbfa1 authorLeon P Smith <leon@melding-monads.com> dateThu 14 May 2015, 01:26 (11 years ago) parenta188a11
1 file changed+4−1
src/Database/PostgreSQL/Simple/Internal.hs+4−1
src/Database/PostgreSQL/Simple/Internal.hs+4−1
@@ -75,7 +75,10 @@ data Connection = Connection {
7575 connectionHandle :: {-# UNPACK #-} !(MVar PQ.Connection)
7676 , connectionObjects :: {-# UNPACK #-} !(MVar TypeInfoCache)
7777 , connectionTempNameCounter :: {-# UNPACK #-} !(IORef Int64)
78− }
78+ } deriving (Typeable)
79+
80+instance Eq Connection where
81+ x == y = connectionHandle x == connectionHandle y
7982
8083data SqlError = SqlError {
8184 sqlState :: ByteString