hedis 0.7.9 → 0.7.10
raw patch · 3 files changed
+19/−7 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG +4/−0
- hedis.cabal +1/−1
- src/Database/Redis/Protocol.hs +14/−6
CHANGELOG view
@@ -1,5 +1,9 @@ # Changelog for Hedis +## 0.7.10++* Improved performance (PR #64)+ ## 0.7.7 * Close connection handle on error
hedis.cabal view
@@ -1,5 +1,5 @@ name: hedis-version: 0.7.9+version: 0.7.10 synopsis: Client library for the Redis datastore: supports full command set, pipelining.
src/Database/Redis/Protocol.hs view
@@ -49,27 +49,35 @@ -- Reply parsers -- reply :: Parser Reply-reply = choice [singleLine, integer, bulk, multiBulk, error]+reply = do+ c <- anyChar+ case c of+ '+' -> singleLine+ '-' -> error+ ':' -> integer+ '$' -> bulk+ '*' -> multiBulk+ _ -> fail "Unknown reply type" singleLine :: Parser Reply-singleLine = SingleLine <$> (char '+' *> takeTill isEndOfLine <* endOfLine)+singleLine = SingleLine <$> (takeTill isEndOfLine <* endOfLine) error :: Parser Reply-error = Error <$> (char '-' *> takeTill isEndOfLine <* endOfLine)+error = Error <$> (takeTill isEndOfLine <* endOfLine) integer :: Parser Reply-integer = Integer <$> (char ':' *> signed decimal <* endOfLine)+integer = Integer <$> (signed decimal <* endOfLine) bulk :: Parser Reply bulk = Bulk <$> do- len <- char '$' *> signed decimal <* endOfLine+ len <- signed decimal <* endOfLine if len < 0 then return Nothing else Just <$> take len <* endOfLine multiBulk :: Parser Reply multiBulk = MultiBulk <$> do- len <- char '*' *> signed decimal <* endOfLine+ len <- signed decimal <* endOfLine if len < 0 then return Nothing else Just <$> count len reply