packages feed

connection-pool 0.2.1 → 0.2.2

raw patch · 7 files changed

+56/−31 lines, 7 filesdep ~streaming-commonsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: streaming-commons

API changes (from Hackage documentation)

+ Data.ConnectionPool.Internal.Streaming: close :: Socket -> IO ()
- Data.ConnectionPool: class ConnectionPoolFor (protocol :: k) where type HandlerData protocol where {
+ Data.ConnectionPool: class ConnectionPoolFor (protocol :: k) where {
- Data.ConnectionPool.Class: class ConnectionPoolFor (protocol :: k) where type HandlerData protocol where {
+ Data.ConnectionPool.Class: class ConnectionPoolFor (protocol :: k) where {

Files

ChangeLog.md view
@@ -1,6 +1,13 @@ # ChangeLog / ReleaseNotes  +## Version 0.2.2++* Removed deprecation warnings about the use of `sClose` instead of `close`.+  (**change**)+* Bumped upper bound on `streaming-commons` to include 0.2.\* versions.++ ## Version 0.2.1  * Relaxed upper bound on base to include version 4.9.\*.
README.md view
@@ -13,7 +13,7 @@ Description ----------- -Connection pool is a family specialised resource pools. Currently package+Connection pool is a family of specialised resource pools. Currently package provides two  1. pool for TCP client connections,@@ -149,17 +149,9 @@   -[Hackage: conduit-extra]:-  http://hackage.haskell.org/package/conduit-extra-[Hackage: connection-pool]:-  http://hackage.haskell.org/package/connection-pool-[Hackage: resource-pool]:-  http://hackage.haskell.org/package/resource-pool-[Hackage: streaming-commons]:-  http://hackage.haskell.org/package/streaming-commons-[Haskell.org]:-  http://www.haskell.org-  "The Haskell Programming Language"-[tl;dr Legal: BSD3]:-  https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29-  "BSD 3-Clause License (Revised)"+[Hackage: conduit-extra]: http://hackage.haskell.org/package/conduit-extra+[Hackage: connection-pool]: http://hackage.haskell.org/package/connection-pool+[Hackage: resource-pool]: http://hackage.haskell.org/package/resource-pool+[Hackage: streaming-commons]: http://hackage.haskell.org/package/streaming-commons+[Haskell.org]: http://www.haskell.org "The Haskell Programming Language"+[tl;dr Legal: BSD3]: https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29 "BSD 3-Clause License (Revised)"
connection-pool.cabal view
@@ -1,9 +1,9 @@ name:                   connection-pool-version:                0.2.1+version:                0.2.2 synopsis:   Connection pool built on top of resource-pool and streaming-commons. description:-  Connection poll is a family specialised resource pools. Currently package+  Connection poll is a family of specialised resource pools. Currently package   provides two variants:   .   1. pool for TCP client connections,@@ -96,7 +96,7 @@       -- Version 0.2.0.0 of resource-pool was the first that used monad-control       -- package. At the time of writing (version 0.2.3.0) used subset of API       -- is stable.-    , streaming-commons >=0.1.3 && <0.2+    , streaming-commons >=0.1.3 && <0.3       -- First version that had getSocketFamilyTCP function and also Earlier       -- versions have different definition of ClientSettings. Those two things       -- are actually related.@@ -143,7 +143,7 @@   type:                 git   location:             git://github.com/trskop/connection-pool.git -source-repository this-  type:                 git-  location:             git://github.com/trskop/connection-pool.git-  tag:                  v0.2.1+--source-repository this+--  type:                 git+--  location:             git://github.com/trskop/connection-pool.git+--  tag:                  v0.2.2
src/Data/ConnectionPool/Family.hs view
@@ -46,10 +46,11 @@ import Data.Typeable (Typeable) #endif + -- | Family of connection pools parametrised by transport protocol. ----- /Definition changed version 0.2 to be kind polymorphic (only on GHC >=/--- /7.10) and became part of stable API by being moved in to/+-- /Definition changed in version 0.2 to be kind polymorphic (only on GHC >=/+-- /7.10), and became part of stable API by being moved in to/ -- /"Data.ConnectionPool.Family" module./ data family ConnectionPool #ifdef KIND_POLYMORPHIC_TYPEABLE_POLYKINDED_DATA_FAMILIES
src/Data/ConnectionPool/Internal/Streaming.hs view
@@ -47,6 +47,9 @@     , fromClientSettingsUnix #endif     -- !WINDOWS++    -- * Socket+    , close     )   where @@ -54,7 +57,14 @@ import Data.Maybe (Maybe(Just)) import System.IO (IO) -import Network.Socket (Socket, SockAddr, sClose)+import Network.Socket (Socket, SockAddr)+import qualified Network.Socket as Socket+#if MIN_VERSION_network(2,4,0)+    ( close+#else+    ( sClose+#endif+    ) import Network.Socket.ByteString (sendAll)  import Data.Default.Class (Default(def))@@ -152,7 +162,7 @@     , AppData.appSockAddr' = addr               -- :: !SockAddr     , AppData.appLocalAddr' = localAddr         -- :: !(Maybe SockAddr) #if MIN_VERSION_streaming_commons(0,1,6)-    , AppData.appCloseConnection' = sClose sock -- :: !(IO ())+    , AppData.appCloseConnection' = close sock  -- :: !(IO ()) #endif #if MIN_VERSION_streaming_commons(0,1,12)     , AppData.appRawSocket' = Just sock         -- :: Maybe Socket@@ -247,3 +257,18 @@ #endif     -- !WINDOWS {-# INLINE fromClientSettingsUnix #-}++-- | Compatibility wrapper around @close\/sClose@.+--+-- Package <https://hackage.haskell.org/package/network network> deprecated+-- @sClose@ in favour of @close@ in version 2.4.0.0.+--+-- /Since version 0.2.2./+close :: Socket -> IO ()+close =+#if MIN_VERSION_network(2,4,0)+    Socket.close+#else+    Socket.sClose+#endif+{-# INLINE close #-}
src/Data/ConnectionPool/Internal/TCP.hs view
@@ -51,7 +51,6 @@ import System.IO (IO)  import Network.Socket (SockAddr, Socket)-import qualified Network.Socket as Socket (sClose)  import Control.Monad.Trans.Control (MonadBaseControl) import Data.Function.Between.Strict ((<^@~))@@ -82,6 +81,7 @@ import Data.ConnectionPool.Internal.HandlerParams (HandlerParams) import qualified Data.ConnectionPool.Internal.Streaming as Internal     ( acquireTcpClientConnection+    , close     , fromClientSettings     , runTcpApp     )@@ -138,7 +138,7 @@     <$> Internal.createConnectionPool handlerParams acquire release poolParams   where     acquire = Internal.acquireTcpClientConnection tcpParams-    release = Socket.sClose+    release = Internal.close     handlerParams = Internal.fromClientSettings tcpParams {-# INLINE createTcpClientPool #-} 
src/Data/ConnectionPool/Internal/Unix.hs view
@@ -55,7 +55,6 @@ import System.IO (IO)  import Network.Socket (Socket)-import qualified Network.Socket as Socket (sClose)  import Control.Monad.Trans.Control (MonadBaseControl) import Data.Function.Between.Strict ((<^@~))@@ -88,7 +87,8 @@ import Data.ConnectionPool.Internal.HandlerParams (HandlerParams) import Data.ConnectionPool.Internal.ResourcePoolParams (ResourcePoolParams) import qualified Data.ConnectionPool.Internal.Streaming as Internal-    ( fromClientSettingsUnix+    ( close+    , fromClientSettingsUnix     , runUnixApp     ) @@ -142,7 +142,7 @@     <$> Internal.createConnectionPool handlerParams acquire release poolParams   where     acquire = (, ()) <$> getSocketUnix (getPath unixParams)-    release = Socket.sClose+    release = Internal.close     handlerParams = Internal.fromClientSettingsUnix unixParams {-# INLINE createUnixClientPool #-}