diff --git a/Yesod/Core.hs b/Yesod/Core.hs index 8de5e7e9..53a0bed5 100644 --- a/Yesod/Core.hs +++ b/Yesod/Core.hs @@ -93,7 +93,7 @@ type Method = String -- to deal with it directly, as mkYesodSub creates instances appropriately. class Eq (Route s) => YesodSubSite s y where getSubSite :: Site (Route s) (Method -> Maybe (GHandler s y ChooseRep)) - dispatchSubsite :: y -> Maybe CS.Key -> [String] -> (y -> s) -> W.Application + dispatchSubsite :: y -> Maybe CS.Key -> [String] -> s -> W.Application dispatchSubsite _ _ _ _ _ = return $ W.responseLBS W.status200 [("Content-Type", "text/plain")] $ L8.pack "FIXME" -- | Define settings for a Yesod applications. The only required setting is diff --git a/Yesod/Dispatch.hs b/Yesod/Dispatch.hs index 79b4cb5f..7f8a4a85 100644 --- a/Yesod/Dispatch.hs +++ b/Yesod/Dispatch.hs @@ -188,7 +188,7 @@ mkYesodGeneral name args clazzes isSub res = do master <- newName "master" mkey <- newName "mkey" just <- [|Just|] - (pat', tma', rest) <- mkPat' pieces $ just `AppE` (VarE $ mkName toSub) + (pat', tma', rest) <- mkPat' pieces $ just `AppE` (VarE (mkName toSub) `AppE` VarE master) ds <- [|dispatchSubsite|] let body' = ds `AppE` VarE master `AppE` VarE mkey `AppE` rest fmap' <- [|(<$>)|] @@ -260,12 +260,12 @@ mkToMasterArg ps fname = do let nargs = length $ filter (not.isStatic) ps f = VarE $ mkName fname args <- sequence $ take nargs $ repeat $ newName "x" - rsg <- [| runSubsiteGetter|] + rsg <- [|error "runSubsiteGetter"|] let xps = map VarP args xes = map VarE args e' = foldl (\x y -> x `AppE` y) f xes e = rsg `AppE` e' - return $ LamE xps e + return $ rsg -- FIXME LamE xps e -- | Convert the given argument into a WAI application, executable with any WAI -- handler. This is the same as 'toWaiAppPlain', except it includes three