staticFiles (in Yesod.Static) does not work without OverloadedStrings (#437)
This commit is contained in:
parent
fe88be19dd
commit
992f4e7893
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user