diff --git a/Yesod/Dispatch.hs b/Yesod/Dispatch.hs index 3c691152..1396d733 100644 --- a/Yesod/Dispatch.hs +++ b/Yesod/Dispatch.hs @@ -62,7 +62,7 @@ import Control.Monad import Data.Maybe import Web.ClientSession import qualified Web.ClientSession as CS -import Data.Char (isLower, isUpper) +import Data.Char (isUpper) import Data.Serialize import qualified Data.Serialize as Ser @@ -183,14 +183,10 @@ isStatic :: Piece -> Bool isStatic StaticPiece{} = True isStatic _ = False -fromStatic :: Piece -> String -fromStatic (StaticPiece s) = s -fromStatic _ = error "fromStatic" - thResourceFromResource :: Type -> Resource -> Q THResource thResourceFromResource _ (Resource n ps atts) | all (all isUpper) atts = return (n, Simple ps atts) -thResourceFromResource master (Resource n ps atts@[stype, toSubArg]) +thResourceFromResource master (Resource n ps [stype, toSubArg]) -- static route to subsite = do let stype' = ConT $ mkName stype diff --git a/Yesod/Handler.hs b/Yesod/Handler.hs index eb7db8a9..e9d9a4f4 100644 --- a/Yesod/Handler.hs +++ b/Yesod/Handler.hs @@ -77,7 +77,7 @@ module Yesod.Handler -- * Internal Yesod , runHandler , YesodApp (..) - , SubsiteGetter(..) + , runSubsiteGetter , toMasterHandler , toMasterHandlerDyn , toMasterHandlerMaybe @@ -183,9 +183,9 @@ class SubsiteGetter g m s | g -> s where instance (master ~ master' ) => SubsiteGetter (master -> sub) (GHandler anySub master') sub where - runSubsiteGetter get = do + runSubsiteGetter getter = do y <- getYesod - return $ get y + return $ getter y instance (anySub ~ anySub' ,master ~ master' diff --git a/Yesod/Helpers/Static.hs b/Yesod/Helpers/Static.hs index 6d5a954b..7a9048f5 100644 --- a/Yesod/Helpers/Static.hs +++ b/Yesod/Helpers/Static.hs @@ -31,6 +31,9 @@ module Yesod.Helpers.Static -- * Lookup files in filesystem , fileLookupDir , staticFiles + -- * Embed files + , mkEmbedFiles + , getStaticHandler -- * Hashing , base64md5 #if TEST