staticFiles (in Yesod.Static) does not work without OverloadedStrings (#437)

This commit is contained in:
Michael Snoyman 2012-12-26 15:59:49 +02:00
parent fe88be19dd
commit 992f4e7893
2 changed files with 2 additions and 5 deletions

View File

@ -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

View File

@ -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