git.iko.soy/typeable/postgresql-simple
on master help sign in
Merge pull request #235 from MailOnline/master

Add Generic ConnectInfo instance

commit428131d9bcb680594d8611be10f32480c5f0018a authorLeon P Smith <leon.p.smith+github@gmail.com> dateThu 30 Nov 2017, 12:52 (9 years ago) parentcfb1685dfbf5d9
1 file changed+4−2
src/Database/PostgreSQL/Simple/Internal.hs+4−2
src/Database/PostgreSQL/Simple/Internal.hs+4−2
@@ -1,5 +1,6 @@
11{-# LANGUAGE CPP, BangPatterns, DoAndIfThenElse, RecordWildCards #-}
2−{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
2+{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-}
3+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
34
45------------------------------------------------------------------------------
56-- |
@@ -50,6 +51,7 @@ import Database.PostgreSQL.Simple.TypeInfo.Types(TypeInfo)
5051import Control.Monad.Trans.State.Strict
5152import Control.Monad.Trans.Reader
5253import Control.Monad.Trans.Class
54+import GHC.Generics
5355import GHC.IO.Exception
5456#if !defined(mingw32_HOST_OS)
5557import Control.Concurrent(threadWaitRead, threadWaitWrite)
@@ -119,7 +121,7 @@ data ConnectInfo = ConnectInfo {
119121 , connectUser :: String
120122 , connectPassword :: String
121123 , connectDatabase :: String
122− } deriving (Eq,Read,Show,Typeable)
124+ } deriving (Generic,Eq,Read,Show,Typeable)
123125
124126-- | Default information for setting up a connection.
125127--