apiary-cookie 0.7.0.0 → 0.8.0.0
raw patch · 2 files changed
+7/−7 lines, 2 filesdep ~apiaryPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: apiary
API changes (from Hackage documentation)
- Web.Apiary.Cookie: cookie :: (Strategy w, Query a) => ByteString -> Proxy (w a) -> Apiary (SNext w as a) b -> Apiary as b
+ Web.Apiary.Cookie: cookie :: (Strategy w, Query a, Functor n, Monad n) => ByteString -> Proxy (w a) -> ApiaryT (SNext w as a) n m b -> ApiaryT as n m b
- Web.Apiary.Cookie: deleteCookie :: ByteString -> Action ()
+ Web.Apiary.Cookie: deleteCookie :: Monad m => ByteString -> ActionT m ()
- Web.Apiary.Cookie: setCookie :: SetCookie -> Action ()
+ Web.Apiary.Cookie: setCookie :: Monad m => SetCookie -> ActionT m ()
- Web.Apiary.Cookie.Internal: cookie :: (Strategy w, Query a) => ByteString -> Proxy (w a) -> Apiary (SNext w as a) b -> Apiary as b
+ Web.Apiary.Cookie.Internal: cookie :: (Strategy w, Query a, Functor n, Monad n) => ByteString -> Proxy (w a) -> ApiaryT (SNext w as a) n m b -> ApiaryT as n m b
- Web.Apiary.Cookie.Internal: deleteCookie :: ByteString -> Action ()
+ Web.Apiary.Cookie.Internal: deleteCookie :: Monad m => ByteString -> ActionT m ()
- Web.Apiary.Cookie.Internal: setCookie :: SetCookie -> Action ()
+ Web.Apiary.Cookie.Internal: setCookie :: Monad m => SetCookie -> ActionT m ()
Files
apiary-cookie.cabal view
@@ -1,5 +1,5 @@ name: apiary-cookie-version: 0.7.0.0+version: 0.8.0.0 synopsis: Cookie support for apiary web framework. description: example: <https://github.com/philopon/apiary/blob/master/examples/auth.hs>@@ -22,7 +22,7 @@ other-extensions: build-depends: base >=4.6 && <4.8 , bytestring >=0.10 && <0.11- , apiary >=0.7 && <0.8+ , apiary >=0.8 && <0.9 , cookie >=0.4 && <0.5 , blaze-builder >=0.3 && <0.4 , wai >=2.1 && <2.2
src/Web/Apiary/Cookie/Internal.hs view
@@ -37,11 +37,11 @@ -- cookie "baz" (pMany (pMaybe pString)) -- get zero or more baz cookies. allows cookie decrypt failure. -- cookie "baz" (Proxy :: Proxy (LimitSome [int|100|] ByteString)) -- get raw cookies up to 100 entries. -- @-cookie :: (Strategy w, Query a)+cookie :: (Strategy w, Query a, Functor n, Monad n) => S.ByteString -> Proxy (w a)- -> Apiary (SNext w as a) b- -> Apiary as b+ -> ApiaryT (SNext w as a) n m b+ -> ApiaryT as n m b cookie k p = function $ \l r -> readStrategy (readQuery . Just) ((k ==) . fst) p (cookie' r) l cookie' :: Request -> [(S.ByteString, S.ByteString)]@@ -51,13 +51,13 @@ requestHeaders -- | delete cookie. since 0.6.1.0.-deleteCookie :: S.ByteString -> Action ()+deleteCookie :: Monad m => S.ByteString -> ActionT m () deleteCookie k = setCookie def { setCookieName = k , setCookieExpires = Just $ UTCTime (ModifiedJulianDay 0) 0 , setCookieMaxAge = Just 0 } -- | set raw cookie header.-setCookie :: SetCookie -> Action ()+setCookie :: Monad m => SetCookie -> ActionT m () setCookie = addHeader "set-cookie" . toByteString . renderSetCookie