diff --git a/yesod-static/Yesod/Static.hs b/yesod-static/Yesod/Static.hs index 0be51a4f..dbd54fca 100644 --- a/yesod-static/Yesod/Static.hs +++ b/yesod-static/Yesod/Static.hs @@ -301,7 +301,7 @@ mkStaticFilesList fp fs routeConName makeHash = do pack' <- [|pack|] qs <- if makeHash then do hash <- qRunIO $ base64md5File $ pathFromRawPieces fp f - [|[("etag" :: Text, pack $(lift hash))]|] + [|[(pack "etag", pack $(lift hash))]|] else return $ ListE [] return [ SigD routeName $ ConT route diff --git a/yesod-static/sample.hs b/yesod-static/sample.hs index d0a25db1..8b3df38e 100644 --- a/yesod-static/sample.hs +++ b/yesod-static/sample.hs @@ -1,5 +1,4 @@ {-# LANGUAGE QuasiQuotes, TypeFamilies, MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} import Yesod.Static import Yesod.Dispatch @@ -17,11 +16,9 @@ mkYesod "Sample" [parseRoutes| /static StaticR Static getStatic |] instance Yesod Sample where - approot _ = "" - cleanPath _ = Right -- FIXME make this unnecessary perhaps getRootR = do - redirectText RedirectPermanent "static" + redirect "static" return () main = do