Created
April 4, 2012 20:02
-
-
Save scan/2305168 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getSid = do | |
msid <- optional $ lookCookieValue "ponysession" | |
case msid of | |
Nothing -> do | |
sid <- genSessionId | |
addCookie Session $ mkCookie "ponysession" $ B.unpack sid | |
return sid | |
Just sid -> return $ B.pack sid | |
{- | |
No instance for (FilterMonad Response m0) | |
arising from a use of `addCookie' | |
Possible fix: | |
add an instance declaration for (FilterMonad Response m0) | |
In the expression: addCookie Session | |
In a stmt of a 'do' block: | |
addCookie Session $ mkCookie "ponysession" $ B.unpack sid | |
In the expression: | |
do { sid <- genSessionId; | |
addCookie Session $ mkCookie "ponysession" $ B.unpack sid; | |
return sid } | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment