Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ cabal-dev
*.chi
*.chs.h
.virthualenv
.stack-work
8 changes: 6 additions & 2 deletions hedis-simple.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: hedis-simple
version: 0.1.0.0
version: 0.1.1.0
synopsis: A simplified API for hedis
description: hedis-simple wraps most hedis commands in an EitherT monad to simplify a lot of the verbose error checking that one would normally have to perform.
homepage: http://github.com/sanetracker/hedis-simple
Expand All @@ -18,5 +18,9 @@ source-repository head

library
exposed-modules: Database.Redis.Simple
build-depends: base ==4.6.*, mtl ==2.1.*, either ==3.4.*, bytestring ==0.10.*, hedis ==0.6.*
build-depends: base >= 4.7 && < 5
, mtl >= 2.1
, either >= 3.4
, bytestring >= 0.10
, hedis == 0.6.*
hs-source-dirs: src
3 changes: 2 additions & 1 deletion src/Database/Redis/Simple.hs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ module Database.Redis.Simple (
import Control.Applicative
import Control.Monad.Trans
import Control.Monad.Trans.Either
import Control.Monad.Error.Class
import Data.ByteString (ByteString)
import qualified Database.Redis as R

Expand All @@ -181,7 +182,7 @@ class WrappedRedis m mi r | m -> mi r where
unwrap :: m a -> mi (r a)

newtype Redis a = Redis { fromRedis :: EitherT R.Reply R.Redis a }
deriving (Functor, Applicative, Monad, MonadIO)
deriving (Functor, Applicative, Monad, MonadIO, MonadError R.Reply)

newtype RedisTx a = RedisTx { fromRedisTx :: R.RedisTx (R.Queued a) }

Expand Down
32 changes: 32 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md

# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: lts-3.11

# Local packages, usually specified by relative directory name
packages:
- '.'

# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
extra-deps: []

# Override default flag values for local packages and extra-deps
flags: {}

# Extra package databases containing global packages
extra-package-dbs: []

# Control whether we use the GHC we find on the path
# system-ghc: true

# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: >= 0.1.4.0

# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64

# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]