Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/Database/PostgreSQL/LibPQ/Enums.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,14 @@ data Verbosity
= ErrorsTerse
| ErrorsDefault
| ErrorsVerbose
| ErrorsSqlstate
deriving (Eq, Show)

instance FromCInt Verbosity where
fromCInt (#const PQERRORS_TERSE) = Just ErrorsTerse
fromCInt (#const PQERRORS_DEFAULT) = Just ErrorsDefault
fromCInt (#const PQERRORS_VERBOSE) = Just ErrorsVerbose
fromCInt (#const PQERRORS_TERSE) = Just ErrorsTerse
fromCInt (#const PQERRORS_DEFAULT) = Just ErrorsDefault
fromCInt (#const PQERRORS_VERBOSE) = Just ErrorsVerbose
fromCInt (#const PQERRORS_SQLSTATE) = Just ErrorsSqlstate
fromCInt _ = Nothing

instance ToCInt Verbosity where
Expand Down
Loading