{-# LANGUAGE CPP #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Database.Redis.Core.Internal where
#if __GLASGOW_HASKELL__ > 711
import Control.Monad.Fail (MonadFail)
#endif
import Control.Monad.Reader
import Data.IORef
import Database.Redis.Protocol
import qualified Database.Redis.ProtocolPipelining as PP
newtype Redis a =
Redis (ReaderT RedisEnv IO a)
deriving (Monad, MonadIO, Functor, Applicative)
#if __GLASGOW_HASKELL__ > 711
deriving instance MonadFail Redis
#endif
data RedisEnv =
Env
{ envConn :: PP.Connection
, envLastReply :: IORef Reply
}