hedis-0.15.2: 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
  - = NonClusteredEnv {
    - envConn :: Connection
    - envLastReply :: IORef Reply
    }
  - | ClusteredEnv {
    - refreshAction :: IO ShardMap
    - connection :: Connection
    }

# 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

MonadIO Redis Source # |
Instance details Defined in Database.Redis.Core.Internal Methods liftIO :: IO a -> Redis a Source #
Applicative Redis Source # |
Instance details Defined in Database.Redis.Core.Internal Methods pure :: a -> Redis a Source # (<*>) :: Redis (a -> b) -> Redis a -> Redis b Source # liftA2 :: (a -> b -> c) -> Redis a -> Redis b -> Redis c Source # (*>) :: Redis a -> Redis b -> Redis b Source # (<*) :: Redis a -> Redis b -> Redis a Source #
Functor Redis Source # |
Instance details Defined in Database.Redis.Core.Internal Methods fmap :: (a -> b) -> Redis a -> Redis b Source # (<$) :: a -> Redis b -> Redis a Source #
Monad Redis Source # |
Instance details Defined in Database.Redis.Core.Internal Methods (>>=) :: Redis a -> (a -> Redis b) -> Redis b Source # (>>) :: Redis a -> Redis b -> Redis b Source # return :: a -> Redis a Source #
MonadFail Redis Source # |
Instance details Defined in Database.Redis.Core.Internal Methods fail :: String -> Redis a Source #
MonadRedis Redis Source # |
Instance details Defined in Database.Redis.Core Methods liftRedis :: Redis a -> Redis a Source #
MonadUnliftIO Redis Source # |
Instance details Defined in Database.Redis.Core.Internal Methods withRunInIO :: ((forall a. Redis a -> IO a) -> IO b) -> Redis b 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

NonClusteredEnv |

Fields

- envConn :: Connection
- envLastReply :: IORef Reply

ClusteredEnv |

Fields

- refreshAction :: IO ShardMap
- connection :: Connection