packages feed

hpqtypes 1.8.0.0 → 1.8.0.1

raw patch · 3 files changed

+15/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -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.
hpqtypes.cabal view
@@ -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)
src/Database/PostgreSQL/PQTypes/Internal/Connection.hs view
@@ -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 ->