diff --git a/Yesod/Dispatch.hs b/Yesod/Dispatch.hs index c5a1c114..9dfa3819 100644 --- a/Yesod/Dispatch.hs +++ b/Yesod/Dispatch.hs @@ -124,7 +124,6 @@ toWaiApp' y resource session' env = do : encodePathInfo (fixSegs $ quasiRender site u) rr <- parseWaiRequest env session' onRequest y rr - print pathSegments -- FIXME remove let ya = case eurl of Left _ -> runHandler (errorHandler y NotFound) render diff --git a/Yesod/Hamlet.hs b/Yesod/Hamlet.hs index 790a3412..a33b05b9 100644 --- a/Yesod/Hamlet.hs +++ b/Yesod/Hamlet.hs @@ -38,7 +38,6 @@ data PageContent url = PageContent , pageBody :: Hamlet url IO () } --- FIXME some typeclasses for the stuff below? -- | Converts the given Hamlet template into 'Content', which can be used in a -- Yesod 'Response'. hamletToContent :: Hamlet (Routes master) IO () -> GHandler sub master Content diff --git a/Yesod/Helpers/Auth.hs b/Yesod/Helpers/Auth.hs index 7dbd039c..988b950e 100644 --- a/Yesod/Helpers/Auth.hs +++ b/Yesod/Helpers/Auth.hs @@ -98,9 +98,9 @@ getOpenIdForward = do render <- getUrlRender let complete = render OpenIdComplete res <- runAttemptT $ OpenId.getForwardUrl oid complete + let errurl err = render OpenIdR ++ "?message=" ++ encodeUrl (show err) attempt - (\err -> redirectString RedirectTemporary -- FIXME - $ "/auth/openid/?message=" ++ encodeUrl (show err)) + (\err -> redirectString RedirectTemporary $ errurl err) (redirectString RedirectTemporary) res @@ -109,9 +109,9 @@ getOpenIdComplete = do rr <- getRequest let gets' = reqGetParams rr res <- runAttemptT $ OpenId.authenticate gets' - let onFailure err = redirectString RedirectTemporary -- FIXME - $ "/auth/openid/?message=" - ++ encodeUrl (show err) + render <- getUrlRender + let errurl err = render OpenIdR ++ "?message=" ++ encodeUrl (show err) + let onFailure err = redirectString RedirectTemporary $ errurl err let onSuccess (OpenId.Identifier ident) = do y <- getYesod header authCookieName ident @@ -207,22 +207,6 @@ redirectLogin = do Rpxnow -> RpxnowR -- FIXME this doesn't actually show a login page? redirectSetDest RedirectTemporary r -{- FIXME --- | Determinge the path requested by the user (ie, the path info). This --- includes the query string. -requestPath :: (Functor m, Monad m, RequestReader m) => m String -requestPath = do - env <- waiRequest - let q = case B8.unpack $ W.queryString env of - "" -> "" - q'@('?':_) -> q' - q' -> '?' : q' - return $! dropSlash (B8.unpack $ W.pathInfo env) ++ q - where - dropSlash ('/':x) = x - dropSlash x = x --} - -- | Redirect to the given URL, and set a cookie with the current URL so the -- user will ultimately be sent back here. redirectSetDest :: RedirectType @@ -230,13 +214,13 @@ redirectSetDest :: RedirectType -> GHandler sub master a redirectSetDest rt dest = do ur <- getUrlRender + toMaster <- getRouteToMaster curr <- getRoute let curr' = case curr of Just x -> ur x Nothing -> "/" -- should never happen anyway - dest' = ur dest addCookie destCookieTimeout destCookieName curr' - redirectString rt dest' -- FIXME use redirect? + redirect rt $ toMaster dest -- | Read the 'destCookieName' cookie and redirect to this destination. If the -- cookie is missing, then use the default path provided. @@ -248,4 +232,4 @@ redirectToDest rt def = do (x:_) -> do deleteCookie destCookieName return x - redirectString rt dest -- FIXME use redirect? + redirectString rt dest diff --git a/Yesod/Helpers/Sitemap.hs b/Yesod/Helpers/Sitemap.hs index 361791b7..f3701b0b 100644 --- a/Yesod/Helpers/Sitemap.hs +++ b/Yesod/Helpers/Sitemap.hs @@ -39,10 +39,6 @@ showFreq Weekly = "weekly" showFreq Monthly = "monthly" showFreq Yearly = "yearly" showFreq Never = "never" -{- FIXME -instance ConvertSuccess SitemapChangeFreq Html where - convertSuccess = (cs :: String -> Html) . cs --} data SitemapUrl url = SitemapUrl { sitemapLoc :: url diff --git a/Yesod/Helpers/Static.hs b/Yesod/Helpers/Static.hs index 40c50657..c8b24dd5 100644 --- a/Yesod/Helpers/Static.hs +++ b/Yesod/Helpers/Static.hs @@ -1,7 +1,6 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} -{-# OPTIONS_GHC -fno-warn-overlapping-patterns #-} -- FIXME due to bug in web-routes-quasi --------------------------------------------------------- -- -- Module : Yesod.Helpers.Static @@ -42,7 +41,6 @@ data Static = Static FileLookup staticArgs :: FileLookup -> Static staticArgs = Static --- FIXME bug in web-routes-quasi generates warning here $(mkYesodSub "Static" [] [$parseRoutes| /* StaticRoute GET |]) diff --git a/Yesod/Yesod.hs b/Yesod/Yesod.hs index b69e2ef0..166728dc 100644 --- a/Yesod/Yesod.hs +++ b/Yesod/Yesod.hs @@ -108,7 +108,7 @@ applyLayoutJson :: Yesod master applyLayoutJson t x toH toJ = do let pc = PageContent { pageTitle = cs t - , pageHead = return () -- FIXME allow user to supply? + , pageHead = return () , pageBody = toH x } y <- getYesodMaster