From 992f4e7893072c7c3ea63b0d6226cb5032f9d047 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 26 Dec 2012 15:59:49 +0200 Subject: [PATCH] staticFiles (in Yesod.Static) does not work without OverloadedStrings (#437) --- yesod-static/Yesod/Static.hs | 2 +- yesod-static/sample.hs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) 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