diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+# hpqtypes-1.8.0.1 (2020-02-06)
+* Make poolSource work properly with shortcircuiting monad transformers.
+
 # hpqtypes-1.8.0.0 (2019-10-31)
 * Implement `UUID` format ([#17](https://github.com/scrive/hpqtypes/pull/17)).
 * Support GHC 8.8.
diff --git a/hpqtypes.cabal b/hpqtypes.cabal
--- a/hpqtypes.cabal
+++ b/hpqtypes.cabal
@@ -1,5 +1,5 @@
 name:                hpqtypes
-version:             1.8.0.0
+version:             1.8.0.1
 synopsis:            Haskell bindings to libpqtypes
 
 description:         Efficient and easy-to-use bindings to (slightly modified)
diff --git a/src/Database/PostgreSQL/PQTypes/Internal/Connection.hs b/src/Database/PostgreSQL/PQTypes/Internal/Connection.hs
--- a/src/Database/PostgreSQL/PQTypes/Internal/Connection.hs
+++ b/src/Database/PostgreSQL/PQTypes/Internal/Connection.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 module Database.PostgreSQL.PQTypes.Internal.Connection (
     Connection(..)
   , ConnectionData(..)
@@ -152,12 +153,22 @@
     withConnection = withResource' pool . (clearStats >=>)
   }
   where
+#if MIN_VERSION_exceptions(0,9,0)
+    withResource' pool m = fst <$> generalBracket
+      (liftBase $ takeResource pool)
+      (\(resource, local) exitCase -> case exitCase of
+          ExitCaseSuccess _ -> liftBase $ putResource local resource
+          _                 -> liftBase $ destroyResource pool local resource
+      )
+      (\(resource, _) -> m resource)
+#else
     withResource' pool m =  mask $ \restore -> do
       (resource, local) <- liftBase $ takeResource pool
       ret <- restore (m resource) `onException`
         liftBase (destroyResource pool local resource)
       liftBase $ putResource local resource
       return ret
+#endif
 
     clearStats conn@(Connection mv) = do
       liftBase . modifyMVar_ mv $ \mconn ->
