packages feed

hedis 0.12.11 → 0.12.12

raw patch · 3 files changed

+12/−5 lines, 3 filesdep +exceptionsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: exceptions

API changes (from Hackage documentation)

- Database.Redis: withCheckedConnect :: ConnectInfo -> (Connection -> IO c) -> IO c
+ Database.Redis: withCheckedConnect :: (MonadMask m, MonadIO m) => ConnectInfo -> (Connection -> m c) -> m c
- Database.Redis: withConnect :: ConnectInfo -> (Connection -> IO c) -> IO c
+ Database.Redis: withConnect :: (MonadMask m, MonadIO m) => ConnectInfo -> (Connection -> m c) -> m c

Files

CHANGELOG view
@@ -1,5 +1,9 @@ # Changelog for Hedis +## 0.12.12++* PR #149. Make withConnect friendly to transformer stack+ ## 0.12.11  * Expose `withCheckedConnect`, `withConnect`
hedis.cabal view
@@ -1,5 +1,5 @@ name:               hedis-version:            0.12.11+version:            0.12.12 synopsis:     Client library for the Redis datastore: supports full command set,     pipelining.@@ -73,6 +73,7 @@                     base >= 4.8 && < 5,                     bytestring >= 0.9,                     bytestring-lexing >= 0.5,+                    exceptions,                     unordered-containers,                     text,                     deepseq,@@ -141,6 +142,7 @@ test-suite doctest     type: exitcode-stdio-1.0     main-is: DocTest.hs+    ghc-options: -O0 -rtsopts     build-depends:         base == 4.*,         doctest
src/Database/Redis/Core.hs view
@@ -18,6 +18,7 @@ #endif import Control.Exception import Control.Monad.Reader+import qualified Control.Monad.Catch as Catch import qualified Data.ByteString as B import Data.IORef import Data.Pool@@ -250,12 +251,12 @@ disconnect (Conn pool) = destroyAllResources pool  -- | Memory bracket around 'connect' and 'disconnect'. -withConnect :: ConnectInfo -> (Connection -> IO c) -> IO c-withConnect connInfo = bracket (connect connInfo) disconnect+withConnect :: (Catch.MonadMask m, MonadIO m) => ConnectInfo -> (Connection -> m c) -> m c+withConnect connInfo = Catch.bracket (liftIO $ connect connInfo) (liftIO . disconnect)  -- | Memory bracket around 'checkedConnect' and 'disconnect'-withCheckedConnect :: ConnectInfo -> (Connection -> IO c) -> IO c-withCheckedConnect connInfo = bracket (checkedConnect connInfo) disconnect+withCheckedConnect :: (Catch.MonadMask m, MonadIO m) => ConnectInfo -> (Connection -> m c) -> m c+withCheckedConnect connInfo = Catch.bracket (liftIO $ checkedConnect connInfo) (liftIO . disconnect)  -- The AUTH command. It has to be here because it is used in 'connect'. auth