packages feed

hasql-resource-pool 0.5.4.0 → 0.5.4.1

raw patch · 4 files changed

+15/−13 lines, 4 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Hasql.Pool.Observer: Observed :: Rational -> Observed
+ Hasql.Pool.Observer: [latency] :: Observed -> Rational
+ Hasql.Pool.Observer: instance GHC.Show.Show Hasql.Pool.Observer.Observed
+ Hasql.Pool.Observer: newtype Observed
+ Hasql.Pool.Observer: type ObserverAction = Observed -> IO ()

Files

CHANGELOG.md view
@@ -1,16 +1,15 @@-# 0.5.3.1--* `acquireWithStripes` renamed to `aquireWith` and allows specifying a custom `ConnectionGetter`.+# 0.5.4.1 +* Upgrade to support breaking changes of `hasql-1.6.3`. No breaking changes introduced to the library. -# 0.5.4.0+# 0.5.3.1 -Upgrade to support breaking changes of `hasql-1.6.3`. No breaking changes introduced to the library.+* `acquireWithStripes` renamed to `aquireWith` and allows specifying a custom `ConnectionGetter`.   # 0.5.3 -Initial release as a new package. The implementation is based on `hasql-pool` v0.5.2.2+* Initial release as a new package. The implementation is based on `hasql-pool` v0.5.2.2 and continues using `resource-pool` v0.2.x (actually, a [fork with important performance and stats changes applied](https://github.com/bos/pool/pull/43)).-The long-term plan is to make a switch to a [newer v0.3.x maintained by scrive](https://github.com/bos/pool/pull/43).+* The long-term plan is to make a switch to a [newer v0.3.x maintained by scrive](https://github.com/bos/pool/pull/43).
hasql-resource-pool.cabal view
@@ -1,5 +1,5 @@ name:           hasql-resource-pool-version:        0.5.4.0+version:        0.5.4.1 category:       Hasql, Database, PostgreSQL synopsis:       A pool of connections for Hasql based on resource-pool. description:    This package is derived from hasql-pool v0.5.2.2 and continues using resource-pool for an underlying pool implementation.@@ -30,11 +30,11 @@   default-language:     Haskell2010   other-modules:-    Hasql.Pool.Observer     Hasql.Pool.Prelude     Hasql.Pool.ResourcePool   exposed-modules:     Hasql.Pool+    Hasql.Pool.Observer   build-depends:     -- resources:     resource-pool-fork-avanov,
library/Hasql/Pool/Observer.hs view
@@ -14,4 +14,3 @@   type ObserverAction = Observed -> IO ()-
library/Hasql/Pool/ResourcePool.hs view
@@ -2,20 +2,24 @@ Extras for the resource-pool library. -} module Hasql.Pool.ResourcePool+(   withResourceOnEither+) where  import Hasql.Pool.Prelude import Data.Pool  -withResourceOnEither :: Pool resource -> (resource -> IO (Either failure success)) -> IO (Either failure success)+withResourceOnEither :: Pool resource+                     -> (resource -> IO (Either failure success))+                     -> IO (Either failure success) withResourceOnEither pool act = mask_ $ do     (resource, localPool) <- takeResource pool     failureOrSuccess      <- act resource `onException` destroyResource pool localPool resource     case failureOrSuccess of         Right success -> do             putResource localPool resource-            return (Right success)+            pure $ Right success         Left failure -> do             destroyResource pool localPool resource-            return (Left failure)+            pure $ Left failure