forked from mirrors/nixpkgs
46 lines
1.8 KiB
Diff
46 lines
1.8 KiB
Diff
|
diff --git a/Database/Beam/Postgres/Connection.hs b/Database/Beam/Postgres/Connection.hs
|
||
|
index 433f55b9..5836c53d 100644
|
||
|
--- a/Database/Beam/Postgres/Connection.hs
|
||
|
+++ b/Database/Beam/Postgres/Connection.hs
|
||
|
@@ -52,6 +52,8 @@ import qualified Database.PostgreSQL.Simple.Types as Pg (Null(..), Query(..))
|
||
|
|
||
|
import Control.Monad.Reader
|
||
|
import Control.Monad.State
|
||
|
+import Control.Monad.Fail (MonadFail)
|
||
|
+import qualified Control.Monad.Fail as Fail
|
||
|
|
||
|
import Data.ByteString (ByteString)
|
||
|
import Data.ByteString.Builder (toLazyByteString, byteString)
|
||
|
@@ -302,6 +304,9 @@ deriving instance Functor PgF
|
||
|
newtype Pg a = Pg { runPg :: F PgF a }
|
||
|
deriving (Monad, Applicative, Functor, MonadFree PgF)
|
||
|
|
||
|
+instance MonadFail Pg where
|
||
|
+ fail e = fail $ "Internal Error with: " <> show e
|
||
|
+
|
||
|
instance MonadIO Pg where
|
||
|
liftIO x = liftF (PgLiftIO x id)
|
||
|
|
||
|
diff --git a/beam-postgres.cabal b/beam-postgres.cabal
|
||
|
index e14b84f5..d29a5b67 100644
|
||
|
--- a/beam-postgres.cabal
|
||
|
+++ b/beam-postgres.cabal
|
||
|
@@ -31,7 +31,7 @@ library
|
||
|
beam-migrate >=0.3 && <0.4,
|
||
|
|
||
|
postgresql-libpq >=0.8 && <0.10,
|
||
|
- postgresql-simple >=0.5 && <0.6,
|
||
|
+ postgresql-simple >=0.5 && <0.7,
|
||
|
|
||
|
text >=1.0 && <1.3,
|
||
|
bytestring >=0.10 && <0.11,
|
||
|
@@ -38,7 +38,7 @@ library
|
||
|
|
||
|
hashable >=1.1 && <1.3,
|
||
|
lifted-base >=0.2 && <0.3,
|
||
|
- free >=4.12 && <5.1,
|
||
|
+ free >=4.12 && <5.2,
|
||
|
time >=1.6 && <1.10,
|
||
|
monad-control >=1.0 && <1.1,
|
||
|
mtl >=2.1 && <2.3,
|