packages feed

scotty-cookie 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+8/−8 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

scotty-cookie.cabal view
@@ -1,5 +1,5 @@ name:                scotty-cookie-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Cookie management helper functions for Scotty framework description:         Cookie management helper functions for Scotty framework homepage:            https://bitbucket.org/wniare/scotty-cookie
src/Web/Scotty/Cookie.hs view
@@ -16,18 +16,18 @@  main :: IO () main = scotty 3000 $-    get "/" $ do-        hits <- liftM (fromMaybe "0") $ getCookie "hits"+    get \"/\" $ do+        hits <- liftM (fromMaybe \"0\") $ getCookie \"hits\"          let hits' = case decimal hits of-                        Right n -> TL.pack . show . (+1) $ (fst n :: Integer)-                        Left _  -> "1"+                        Right n -> TL.pack . show . (+1) $ (fst n :: 'Integer')+                        Left _  -> \"1\" -        setSimpleCookie "hits" $ TL.toStrict hits'+        setSimpleCookie \"hits\" $ TL.toStrict hits' -        html $ mconcat [ "\<html\>\<body\>"+        html $ mconcat [ \"\<html\>\<body\>\"                        , hits'-                       , "\<\/body\>\<\/html\>"+                       , \"\<\/body\>\<\/html\>\"                        ] @