hedis 0.8.0 → 0.8.1
raw patch · 4 files changed
+22/−14 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Database.Redis: reRedis :: ReaderT RedisEnv IO a -> Redis a
+ Database.Redis: unRedis :: Redis a -> ReaderT RedisEnv IO a
Files
- CHANGELOG +5/−0
- hedis.cabal +1/−13
- src/Database/Redis.hs +1/−0
- src/Database/Redis/Core.hs +15/−1
CHANGELOG view
@@ -1,5 +1,10 @@ # Changelog for Hedis +## 0.8.1++* Export unRedis/reRedis internalish functions which let you define+ MonadCatch instance easily (see PR #73)+ ## 0.8.0 * Major speed improvement by using non-backtracking parser (PR #69)
hedis.cabal view
@@ -1,5 +1,5 @@ name: hedis-version: 0.8.0+version: 0.8.1 synopsis: Client library for the Redis datastore: supports full command set, pipelining.@@ -58,10 +58,6 @@ library hs-source-dirs: src ghc-options: -Wall -fwarn-tabs- if flag(dev)- ghc-options: -Werror- if flag(dev)- ghc-prof-options: -auto-all exposed-modules: Database.Redis build-depends: scanner >= 0.2, base >= 4.6 && < 5,@@ -93,10 +89,6 @@ hedis, time >= 1.2 ghc-options: -O2 -Wall -rtsopts- if flag(dev)- ghc-options: -Werror- if flag(dev)- ghc-prof-options: -auto-all test-suite hedis-test type: exitcode-stdio-1.0@@ -113,7 +105,3 @@ time -- We use -O0 here, since GHC takes *very* long to compile so many constants ghc-options: -O0 -Wall -rtsopts -fno-warn-unused-do-bind- if flag(dev)- ghc-options: -Werror- if flag(dev)- ghc-prof-options: -auto-all
src/Database/Redis.hs view
@@ -130,6 +130,7 @@ -- * The Redis Monad Redis(), runRedis,+ unRedis, reRedis, RedisCtx(), MonadRedis(), -- * Connection
src/Database/Redis/Core.hs view
@@ -4,7 +4,7 @@ module Database.Redis.Core ( Connection, connect, ConnectInfo(..), defaultConnectInfo,- Redis(),runRedis,+ Redis(), runRedis, unRedis, reRedis, RedisCtx(..), MonadRedis(..), send, recv, sendRequest, auth, select@@ -66,6 +66,20 @@ runRedis :: Connection -> Redis a -> IO a runRedis (Conn pool) redis = withResource pool $ \conn -> runRedisInternal conn redis++-- |Deconstruct Redis constructor.+--+-- 'unRedis' and 'reRedis' can be used to define instances for+-- arbitrary typeclasses.+-- +-- WARNING! These functions are considered internal and no guarantee+-- is given at this point that they will not break in future.+unRedis :: Redis a -> ReaderT RedisEnv IO a+unRedis (Redis r) = r++-- |Reconstruct Redis constructor.+reRedis :: ReaderT RedisEnv IO a -> Redis a+reRedis r = Redis r -- |Internal version of 'runRedis' that does not depend on the 'Connection' -- abstraction. Used to run the AUTH command when connecting.