-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Backend for persistent library using Redis. -- @package persistent-redis @version 0.3.2 module Database.Persist.Redis newtype RedisAuth RedisAuth :: Text -> RedisAuth -- | Information required to connect to a Redis server data RedisConf RedisConf :: Text -> PortID -> Maybe RedisAuth -> Int -> RedisConf -- | Host rdHost :: RedisConf -> Text -- | Port rdPort :: RedisConf -> PortID -- | Auth info rdAuth :: RedisConf -> Maybe RedisAuth -- | Maximum number of connections rdMaxConn :: RedisConf -> Int -- | This class captures the following behaviour: In a context m, -- a command will return it's result wrapped in a "container" of type -- f. -- -- Please refer to the Command Type Signatures section of this page for -- more information. class MonadRedis m => RedisCtx (m :: * -> *) (f :: * -> *) | m -> f -- | 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. data Redis a :: * -> * -- | A threadsafe pool of network connections to a Redis server. Use the -- connect function to create one. data Connection :: * data PortID :: * Service :: String -> PortID PortNumber :: PortNumber -> PortID UnixSocket :: String -> PortID -- | Monad reader transformer keeping Redis connection through out the work type RedisT = ReaderT Connection runRedisPool :: RedisT m a -> Connection -> m a -- | Run a connection reader function against a Redis configuration withRedisConn :: (Monad m, MonadIO m) => RedisConf -> (Connection -> m a) -> m a -- | Extracts connection from RedisT monad transformer thisConnection :: Monad m => RedisT m Connection -- | Execute Redis transaction inside RedisT monad transformer execRedisT :: (Monad m, MonadIO m) => RedisTx (Queued a) -> RedisT m a type RedisBackend = Connection data RedisException NotSupportedOperation :: String -> RedisException ParserError :: String -> RedisException NotSupportedValueType :: String -> RedisException IncorrectUpdate :: String -> RedisException IncorrectBehavior :: RedisException