hedis-0.12.14: Client library for the Redis datastore: supports full command set, pipelining.

Safe Haskell | None
Language | Haskell2010

Database.Redis.Core.Internal

Synopsis

- newtype Redis a = Redis (ReaderT RedisEnv IO a)
- data RedisEnv = Env {
  - envConn :: Connection
  - envLastReply :: IORef Reply
  }

# Documentation

newtype Redis a Source #

Context for normal command execution, outside of transactions. Use `runRedis` to run actions of this type.

In this context, each result is wrapped in an `Either` to account for the possibility of Redis returning an `Error` reply.

Constructors

Redis (ReaderT RedisEnv IO a) |

#### Instances

Instances details

Monad Redis Source # |
Instance details Defined in Database.Redis.Core.Internal Methods (>>=) :: Redis a -> (a -> Redis b) -> Redis b (>>) :: Redis a -> Redis b -> Redis b return :: a -> Redis a
Functor Redis Source # |
Instance details Defined in Database.Redis.Core.Internal Methods fmap :: (a -> b) -> Redis a -> Redis b (<$) :: a -> Redis b -> Redis a
MonadFail Redis Source # |
Instance details Defined in Database.Redis.Core.Internal Methods fail :: String -> Redis a
Applicative Redis Source # |
Instance details Defined in Database.Redis.Core.Internal Methods pure :: a -> Redis a (<*>) :: Redis (a -> b) -> Redis a -> Redis b liftA2 :: (a -> b -> c) -> Redis a -> Redis b -> Redis c (*>) :: Redis a -> Redis b -> Redis b (<*) :: Redis a -> Redis b -> Redis a
MonadIO Redis Source # |
Instance details Defined in Database.Redis.Core.Internal Methods liftIO :: IO a -> Redis a
MonadRedis Redis Source # |
Instance details Defined in Database.Redis.Core Methods liftRedis :: Redis a -> Redis a Source #
RedisCtx Redis (Either Reply) Source # |
Instance details Defined in Database.Redis.Core Methods returnDecode :: RedisResult a => Reply -> Redis (Either Reply a) Source #

data RedisEnv Source #

Constructors

Env |

Fields

- envConn :: Connection
- envLastReply :: IORef Reply