mysnapsession 0.4 → 0.4.1
raw patch · 2 files changed
+6/−8 lines, 2 filesdep ~snapdep ~snap-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: snap, snap-core
API changes (from Hackage documentation)
Files
- mysnapsession.cabal +3/−3
- src/Snap/SessionUtil.hs +3/−5
mysnapsession.cabal view
@@ -1,5 +1,5 @@ Name: mysnapsession-Version: 0.4+Version: 0.4.1 Synopsis: Sessions and continuations for Snap web apps Description: This package provides two Snap extensions, implementing sessions as either memory-backed arbitrary types, or as@@ -31,8 +31,8 @@ base == 4.*, bytestring >= 0.9.1 && < 0.10, mtl == 2.0.*,- snap >= 0.4 && < 0.5,- snap-core >= 0.4 && < 0.5,+ snap >= 0.4 && < 0.6,+ snap-core >= 0.4 && < 0.6, time >= 1.1 && < 1.3, random == 1.0.*, containers >= 0.3 && < 0.5,
src/Snap/SessionUtil.hs view
@@ -27,17 +27,15 @@ retrieved. -} lookupCookie :: MonadSnap m => ByteString -> m (Maybe Cookie)-lookupCookie name = do- rsp <- getResponse- maybe (getCookie name) (return . Just) (getResponseCookie name rsp)+lookupCookie name = getResponse+ >>= maybe (getCookie name) (return . Just) . getResponseCookie name {-| Clears a cookie. This involves setting the cookie to the empty string, with an expiration time in the past. -} clearCookie :: MonadSnap m => ByteString -> m ()-clearCookie name = setCookie cookie- where cookie = Cookie name "" Nothing Nothing Nothing+clearCookie name = setCookie $ Cookie name "" Nothing Nothing Nothing {-| If there is another path component in the request path, pop it off, and