connection-pool 0.1.1.0 → 0.1.2.0
raw patch · 7 files changed
+75/−28 lines, 7 filesdep ~basedep ~streaming-commonsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, streaming-commons
API changes (from Hackage documentation)
Files
- ChangeLog.md +15/−0
- LICENSE +1/−1
- README.md +10/−0
- connection-pool.cabal +17/−12
- src/Data/ConnectionPool/Internal/ConnectionPool.hs +4/−5
- src/Data/ConnectionPool/Internal/ConnectionPoolFamily.hs +1/−1
- src/Data/ConnectionPool/Internal/Streaming.hs +27/−9
ChangeLog.md view
@@ -1,6 +1,14 @@ # ChangeLog / ReleaseNotes +## Version 0.1.2.0 +* Builds with GHC 7.10 and base 4.8. (new)+* Builds with also with [streaming-commons][] `>0.1.5 && <0.1.13`. Tested up to+ [streaming-commons][] version 1.12.1. (new)+* Uploaded to [Hackage][]:+ <http://hackage.haskell.org/package/connection-pool-0.1.2.0>++ ## Version 0.1.1.0 * Package is now buildable on Windows. (new)@@ -26,3 +34,10 @@ [Hackage]: http://hackage.haskell.org/ "HackageDB (or just Hackage) is a collection of releases of Haskell packages."+[streaming-commons]:+ http://hackage.haskell.org/package/streaming-commons+ "Low-dependency functionality commonly needed by various streaming data libraries"++<!--+ vim: filetype=markdown softtabstop=4 shiftwidth=4 expandtab+-->
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2014, Peter Trško+Copyright (c) 2014-2015, Peter Trško All rights reserved.
README.md view
@@ -3,8 +3,12 @@ [ ][Hackage: connection-pool]+[][Haskell.org]+[][tl;dr Legal: BSD3] +[](https://travis-ci.org/trskop/connection-pool) + Description ----------- @@ -139,3 +143,9 @@ 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,5 +1,5 @@ name: connection-pool-version: 0.1.1.0+version: 0.1.2.0 synopsis: Connection pool built on top of resource-pool and streaming-commons. description:@@ -26,7 +26,7 @@ license-file: LICENSE author: Peter Trško maintainer: peter.trsko@gmail.com-copyright: (c) 2014 Peter Trško+copyright: (c) 2014-2015, Peter Trško category: Data, Network build-type: Simple cabal-version: >=1.10@@ -44,7 +44,6 @@ library hs-source-dirs: src- exposed-modules: Data.ConnectionPool , Data.ConnectionPool.Internal.ConnectionPool@@ -52,27 +51,30 @@ , Data.ConnectionPool.Internal.ResourcePoolParams , Data.ConnectionPool.Internal.Streaming + default-language: Haskell2010 other-extensions: CPP , DeriveDataTypeable , FlexibleContexts , NoImplicitPrelude+ , OverloadedStrings , RecordWildCards , StandaloneDeriving , TupleSections , TypeFamilies build-depends:- -- Packages distributed with HaskellPlatform (or GHC itself):- base >=4.6 && <4.8+ -- {{{ Packages distributed with HaskellPlatform (or GHC itself) ----------+ base >=4.6 && <4.9 , network >= 2.2.3 -- Version 2.2.3 introduced module "Network.Socket.ByteString". , time >= 1.0 -- Version 1.0 is the oldest available version of time on Hackage and it -- defines NominalDiffTime. Package -- resource-pool doesn't define any -- version boundaries on this package.+ -- }}} Packages distributed with HaskellPlatform (or GHC itself) ---------- - -- Other packages:+ -- {{{ Other packages ----------------------------------------------------- , between >= 0.9.0.0 , data-default-class == 0.0.* , monad-control >= 0.2.0.1@@ -80,16 +82,19 @@ , resource-pool >= 0.2.0.0 && < 1 -- Version 0.2.0.0 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+ , streaming-commons >= 0.1.3 && < 0.2 -- First version that had getSocketFamilyTCP function and also Earlier -- versions have different definition of ClientSettings. Those two things- -- are actually related. At the time of writing (version 0.1.4.2) used- -- subset of API is stable.+ -- are actually related.+ --+ -- Changes in streaming-commons that broke this package:+ --+ -- * Version 0.1.6 introduced appCloseConnection' field of AppData.+ -- * Version 0.1.12 introduced appRawSocket' field of AppData. , transformers-base >= 0.4.2 && < 0.5 -- Version bounds taken from latest monad-control package (at the moment -- 0.3.3.0), which is a dependency of resource-pool package.-- default-language: Haskell2010+ -- }}} Other packages ----------------------------------------------------- if os(windows) cpp-options: -DWINDOWS@@ -113,4 +118,4 @@ source-repository this type: git location: git://github.com/trskop/connection-pool.git- tag: v0.1.1.0+ tag: v0.1.2.0
src/Data/ConnectionPool/Internal/ConnectionPool.hs view
@@ -62,13 +62,12 @@ -- details. createConnectionPool :: IO (Socket, a)- -- ^ Acquire a connection which is prepresented by a 'Socket'. There might+ -- ^ Acquire a connection which is represented by a 'Socket'. There might -- be additional information associated with specific connection that we- -- represent here as a sencond type in a tuple. Such information are- -- considered read only and aren't passed to release function (see next- -- argument).+ -- pass as a sencond value in a tuple. Such information are considered read+ -- only and aren't passed to release function (see next argument). -> (Socket -> IO ())- -- ^ Release a connection which is prepresented by a 'Socket'.+ -- ^ Release a connection which is represented by a 'Socket'. -> ResourcePoolParams -- ^ Data type representing all 'Pool.createPool' parameters that describe -- internal 'Pool' parameters.
src/Data/ConnectionPool/Internal/ConnectionPoolFamily.hs view
@@ -32,7 +32,7 @@ -- <http://hackage.haskell.org/package/streaming-commons streaming-commons> and -- other non-HaskellPlatform packages directly and it is only allowed to import -- "Data.ConnectionPool.Internal.ConnectionPool" internal module and nothing--- else from this package. This package uses CPP to get OS specific things+-- else from this module. This package uses CPP to get OS specific things -- right. Most importantly Windows doesn't support UNIX Sockets. -- -- Please, bear above in mind when doing modifications.
src/Data/ConnectionPool/Internal/Streaming.hs view
@@ -4,7 +4,7 @@ -- | -- Module: $HEADER$ -- Description: Helper functions that aren't provided by streaming-commons.--- Copyright: (c) 2014 Peter Trsko+-- Copyright: (c) 2014-2015, Peter Trško -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com@@ -24,7 +24,7 @@ -- -- This module doesn't neither depend on -- <http://hackage.haskell.org/package/resource-pool resource-pool> package nor--- any other module of this package, and it shoud stay that way. This package+-- any other module of this package, and it shoud stay that way. This module -- uses CPP to get OS specific things right. Most importantly Windows doesn't -- support UNIX Sockets. --@@ -47,11 +47,11 @@ ) where -import Data.Maybe (Maybe)+import Data.Maybe (Maybe(Just)) import System.IO (IO) import Control.Monad.Trans.Control (MonadBaseControl)-import Network.Socket (Socket, SockAddr)+import Network.Socket (Socket, SockAddr, sClose) import Network.Socket.ByteString (sendAll) import Data.Streaming.Network (getSocketFamilyTCP, safeRecv)@@ -65,7 +65,19 @@ , ClientSettings(ClientSettings) ) import qualified Data.Streaming.Network.Internal as AppData- (AppData(appLocalAddr', appRead', appSockAddr', appWrite'))+ ( AppData+ ( appLocalAddr'+ , appRead'+ , appSockAddr'+ , appWrite'+#if MIN_VERSION_streaming_commons(0,1,6)+ , appCloseConnection'+#endif+#if MIN_VERSION_streaming_commons(0,1,12)+ , appRawSocket'+#endif+ ))+ #ifndef WINDOWS -- Windows doesn't support UNIX Sockets. import qualified Data.Streaming.Network.Internal as AppDataUnix@@ -96,10 +108,16 @@ -> (AppData -> m r) -> m r runTcpAppImpl localAddr sock addr app = app AppData- { AppData.appRead' = safeRecv sock 4096- , AppData.appWrite' = sendAll sock- , AppData.appSockAddr' = addr- , AppData.appLocalAddr' = localAddr+ { AppData.appRead' = safeRecv sock 4096 -- :: !(IO ByteString)+ , AppData.appWrite' = sendAll sock -- :: !(ByteString -> IO ())+ , AppData.appSockAddr' = addr -- :: !SockAddr+ , AppData.appLocalAddr' = localAddr -- :: !(Maybe SockAddr)+#if MIN_VERSION_streaming_commons(0,1,6)+ , AppData.appCloseConnection' = sClose sock -- :: !(IO ())+#endif+#if MIN_VERSION_streaming_commons(0,1,12)+ , AppData.appRawSocket' = Just sock -- :: Maybe Socket+#endif } -- | Wrapper for 'getSocketFamilyTCP' that takes 'ClientSettings' instead of