memcached 0.1.1 → 0.1.2
raw patch · 3 files changed
+12/−5 lines, 3 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- Demo.lhs +4/−0
- Network/Memcache/Protocol.hs +6/−3
- memcached.cabal +2/−2
Demo.lhs view
@@ -72,4 +72,8 @@ > fred' <- Network.Memcache.get memcache "u:fred" > putStrLn ("Fred is " ++ show (fred' :: Maybe User)) +> invalid <- Network.Memcache.get memcache "this key doesn't exist"+> putStrLn ("Unknown returns: " ++ show (invalid :: Maybe User))++ vim: set ts=2 sw=2 et :
Network/Memcache/Protocol.hs view
@@ -101,9 +101,12 @@ get (Server handle) key = do hPutCommand handle ["get", toKey key] val <- getOneValue handle- hGetNetLn handle -- trailing \r\n- hGetNetLn handle -- "END"- return (val >>= fromString)+ case val of+ Nothing -> return Nothing+ Just val -> do+ hGetNetLn handle+ hGetNetLn handle+ return $ fromString val delete (Server handle) key delta = do hPutCommand handle [toKey key, show delta]
memcached.cabal view
@@ -1,5 +1,5 @@ name: memcached-version: 0.1.1+version: 0.1.2 stability: Alpha synopsis: haskell bindings for memcached description: haskell bindings for memcached@@ -10,7 +10,7 @@ maintainer: Alson Kemp <alson@alsonkemp.com> homepage: http://neugierig.org/software/darcs/browse/?r=haskell-memcached;a=summary -build-depends: base>3, network+build-depends: base>3 && <5, network build-type: Simple extra-source-files: Test.hs, Demo.lhs tested-with: GHC==6.8.2, GHC==6.10