summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphadej <>2019-04-26 09:32:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-04-26 09:32:00 (GMT)
commit0c5d73445cc2c022e6c4b9bc103cf8dcd287624d (patch)
treefd4b5e6f4bc2168ee3f31de142863bb50acb8b0f
parenta098883ce205c92b45b74b26b20a332e3b413c8a (diff)
version 0.6.2HEAD0.6.2master
-rwxr-xr-xCHANGES.md4
-rw-r--r--postgresql-simple.cabal8
-rw-r--r--src/Database/PostgreSQL/Simple/Ok.hs7
3 files changed, 16 insertions, 3 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 86d51d0..ccc895f 100755
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,7 @@
+### Version 0.6.2 (2019-04-26)
+
+ * Define `MonadFail Ok`.
+
### Version 0.6.1 (2019-03-04)
* Escape double '??' to a literal '?
diff --git a/postgresql-simple.cabal b/postgresql-simple.cabal
index 548f771..5f91e10 100644
--- a/postgresql-simple.cabal
+++ b/postgresql-simple.cabal
@@ -1,6 +1,6 @@
Cabal-version: 1.12
Name: postgresql-simple
-Version: 0.6.1
+Version: 0.6.2
Synopsis: Mid-Level PostgreSQL client library
Description:
@@ -28,7 +28,8 @@ tested-with:
|| == 8.0.2
|| == 8.2.2
|| == 8.4.4
- || == 8.6.3
+ || == 8.6.5
+ || == 8.8.1
Library
default-language: Haskell2010
@@ -97,7 +98,8 @@ Library
if !impl(ghc >= 8.0)
Build-depends:
- semigroups >=0.18.5 && <0.19
+ fail >=4.9.0.0 && <4.10,
+ semigroups >=0.18.5 && <0.19
if !impl(ghc >= 7.6)
Build-depends:
diff --git a/src/Database/PostgreSQL/Simple/Ok.hs b/src/Database/PostgreSQL/Simple/Ok.hs
index 5030b1e..0f46c94 100644
--- a/src/Database/PostgreSQL/Simple/Ok.hs
+++ b/src/Database/PostgreSQL/Simple/Ok.hs
@@ -37,6 +37,8 @@ import Control.Exception
import Control.Monad(MonadPlus(..))
import Data.Typeable
+import qualified Control.Monad.Fail as Fail
+
-- FIXME: [SomeException] should probably be something else, maybe
-- a difference list (or a tree?)
@@ -77,6 +79,11 @@ instance Monad Ok where
Errors es >>= _ = Errors es
Ok a >>= f = f a
+#if !(MIN_VERSION_base(4,13,0))
+ fail = Fail.fail
+#endif
+
+instance Fail.MonadFail Ok where
fail str = Errors [SomeException (ErrorCall str)]
-- | a way to reify a list of exceptions into a single exception