redis-resp 0.3.2 → 0.4.0
raw patch · 2 files changed
+29/−33 lines, 2 filesdep ~attoparsecdep ~basedep ~bytestring
Dependency ranges changed: attoparsec, base, bytestring, bytestring-conversion, containers, dlist, double-conversion, operational, semigroups, split, transformers
Files
- redis-resp.cabal +17/−18
- src/Data/Redis/Command.hs +12/−15
redis-resp.cabal view
@@ -1,13 +1,13 @@ name: redis-resp-version: 0.3.2+version: 0.4.0 synopsis: REdis Serialization Protocol (RESP) implementation.-license: OtherLicense+license: MPL-2.0 license-file: LICENSE author: Toralf Wittner maintainer: Toralf Wittner <tw@dtex.org>-copyright: (c) 2014 Toralf Wittner-homepage: https://github.com/twittner/redis-resp/-bug-reports: https://github.com/twittner/redis-resp/issues+copyright: (C) 2014 Toralf Wittner+homepage: https://gitlab.com/twittner/redis-resp/+bug-reports: https://gitlab.com/twittner/redis-resp/issues stability: experimental category: Data build-type: Simple@@ -23,13 +23,12 @@ source-repository head type: git- location: git://github.com/twittner/redis-resp.git+ location: git://gitlab.com/twittner/redis-resp.git library default-language: Haskell2010 hs-source-dirs: src ghc-options: -Wall -O2 -fwarn-tabs -funbox-strict-fields- ghc-prof-options: -prof -auto-all exposed-modules: Data.Redis@@ -37,14 +36,14 @@ Data.Redis.Command build-depends:- attoparsec >= 0.11 && < 1.0- , base >= 4.5 && < 5.0- , bytestring >= 0.10.4 && < 1.0- , bytestring-conversion >= 0.2 && < 1.0- , containers >= 0.5 && < 1.0- , double-conversion >= 2.0 && < 3.0- , dlist >= 0.7 && < 1.0- , operational == 0.2.*- , semigroups >= 0.15 && < 1.0- , split >= 0.2 && < 1.0- , transformers >= 0.3 && < 0.5+ attoparsec >= 0.11+ , base >= 4.6 && < 5+ , bytestring >= 0.10.4+ , bytestring-conversion >= 0.2+ , containers >= 0.5+ , double-conversion >= 2.0+ , dlist >= 0.7+ , operational >= 0.2+ , semigroups >= 0.15+ , split >= 0.2+ , transformers >= 0.3
src/Data/Redis/Command.hs view
@@ -28,6 +28,7 @@ , Max (..) , ScoreList (..) , Seconds (..)+ , Milliseconds (..) , Timestamp (..) , Field , Index@@ -70,7 +71,6 @@ -- ** Transactions , discard , exec- , execRaw , multi , unwatch , watch@@ -298,8 +298,7 @@ Watch :: Resp -> Command () Unwatch :: Resp -> Command () Discard :: Resp -> Command ()- Exec :: FromByteString a => Resp -> Command [a]- ExecRaw :: Resp -> Command Resp+ Exec :: Resp -> Command () -- Keys Del :: Resp -> Command Int64@@ -531,10 +530,11 @@ none :: Monoid m => m none = mempty -newtype Seconds = Seconds Int64-newtype Timestamp = Timestamp Int64-newtype BitStart = BitStart ByteString-newtype BitEnd = BitEnd ByteString+newtype Seconds = Seconds Int64+newtype Milliseconds = Milliseconds Int64+newtype Timestamp = Timestamp Int64+newtype BitStart = BitStart ByteString+newtype BitEnd = BitEnd ByteString instance Monoid BitStart where mempty = BitStart ""@@ -610,12 +610,9 @@ watch :: Monad m => NonEmpty Key -> Redis m () watch kk = singleton $ Watch $ cmd (1 + NE.length kk) $ "WATCH" : map key (toList kk) -exec :: (Monad m, FromByteString a) => Redis m [a]+exec :: Monad m => Redis m () exec = singleton $ Exec $ cmd 1 ["EXEC"] -execRaw :: Monad m => Redis m Resp-execRaw = singleton $ ExecRaw $ cmd 1 ["EXEC"]- ----------------------------------------------------------------------------- -- Keys @@ -664,11 +661,11 @@ set :: (Monad m, ToByteString a) => Key -> a -> Opts "SET" -> Redis m Bool set k v o = singleton $ Set $ cmd (3 + len o) $ "SET" : key k : toByteString v : toList (opts o) -ex :: Int64 -> Opts "SET"-ex i = Opts 2 $ "EX" `cons` DL.singleton (int2bytes i)+ex :: Seconds -> Opts "SET"+ex (Seconds i) = Opts 2 $ "EX" `cons` DL.singleton (int2bytes i) -px :: Int64 -> Opts "SET"-px i = Opts 2 $ "PX" `cons` DL.singleton (int2bytes i)+px :: Milliseconds -> Opts "SET"+px (Milliseconds i) = Opts 2 $ "PX" `cons` DL.singleton (int2bytes i) xx :: Opts "SET" xx = Opts 1 $ DL.singleton "XX"