Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add Eq and Show instances for all enumerations

  • Loading branch information...
commit 16a7b140caaf0cba120455bc87e4cad883f3657d 1 parent e0de1ad
@lpsmith authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 Database/PostgreSQL/LibPQ.hsc
View
10 Database/PostgreSQL/LibPQ.hsc
@@ -375,7 +375,7 @@ data PollingStatus
= PollingFailed
| PollingReading
| PollingWriting
- | PollingOk deriving Show
+ | PollingOk deriving (Eq, Show)
pollHelper :: (Ptr PGconn -> IO CInt)
-> Connection
@@ -466,7 +466,7 @@ data ConnStatus
| ConnectionSetEnv -- ^ Negotiating environment-driven
-- parameter settings.
| ConnectionSSLStartup -- ^ Negotiating SSL encryption.
- deriving Show
+ deriving (Eq, Show)
-- | Returns the status of the connection.
@@ -905,7 +905,7 @@ data ExecStatus = EmptyQuery -- ^ The string sent to the server was empty.
| NonfatalError -- ^ A nonfatal error (a notice or
-- warning) occurred.
| FatalError -- ^ A fatal error occurred.
- deriving Show
+ deriving (Eq, Show)
instance Enum ExecStatus where
toEnum (#const PGRES_EMPTY_QUERY) = EmptyQuery
@@ -1741,7 +1741,7 @@ flush connection =
-- | Contains the information needed to cancel a command issued
-- through a particular database connection.
-newtype Cancel = Cancel (ForeignPtr PGcancel) deriving Eq
+newtype Cancel = Cancel (ForeignPtr PGcancel) deriving (Eq, Show)
data PGcancel
@@ -1880,7 +1880,7 @@ setClientEncoding connection enc =
data Verbosity = ErrorsTerse
| ErrorsDefault
- | ErrorsVerbose deriving (Show, Eq)
+ | ErrorsVerbose deriving (Eq, Show)
instance Enum Verbosity where
toEnum (#const PQERRORS_TERSE) = ErrorsTerse
Please sign in to comment.
Something went wrong with that request. Please try again.