diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,7 @@
+## 1.4.20.2
+
+* GHC 8 support
+
 ## 1.4.20.1
 
 * Log a warning when a CSRF error occurs [#1200](https://github.com/yesodweb/yesod/pull/1200)
diff --git a/Yesod/Core/Internal/TH.hs b/Yesod/Core/Internal/TH.hs
--- a/Yesod/Core/Internal/TH.hs
+++ b/Yesod/Core/Internal/TH.hs
@@ -9,7 +9,7 @@
 import Prelude hiding (exp)
 import Yesod.Core.Handler
 
-import Language.Haskell.TH hiding (cxt)
+import Language.Haskell.TH hiding (cxt, instanceD)
 import Language.Haskell.TH.Syntax
 
 import qualified Network.Wai as W
@@ -86,8 +86,13 @@
                    case info of
                      TyConI dec ->
                        case dec of
+#if MIN_VERSION_template_haskell(2,11,0)
+                         DataD _ _ vs _ _ _ -> length vs
+                         NewtypeD _ _ vs _ _ _ -> length vs
+#else
                          DataD _ _ vs _ _ -> length vs
                          NewtypeD _ _ vs _ _ -> length vs
+#endif
                          _ -> 0
                      _ -> 0
                _ -> return 0
@@ -101,7 +106,7 @@
                    case arg of
                      Left  t  -> ( ConT (mkName t):xs, n:ns, cs )
                      Right ts -> ( VarT n         :xs,   ns
-                                 , fmap (\t -> 
+                                 , fmap (\t ->
 #if MIN_VERSION_template_haskell(2,10,0)
                                                AppT (ConT $ mkName t) (VarT n)
 #else
@@ -164,7 +169,7 @@
 mkDispatchInstance master cxt f res = do
     clause' <- mkDispatchClause (mkMDS f [|yesodRunner|]) res
     let thisDispatch = FunD 'yesodDispatch [clause']
-    return [InstanceD cxt yDispatch [thisDispatch]]
+    return [instanceD cxt yDispatch [thisDispatch]]
   where
     yDispatch = ConT ''YesodDispatch `AppT` master
 
@@ -181,3 +186,10 @@
                     [innerFun]
                 ]
     return $ LetE [fun] (VarE helper)
+
+instanceD :: Cxt -> Type -> [Dec] -> Dec
+#if MIN_VERSION_template_haskell(2,11,0)
+instanceD = InstanceD Nothing
+#else
+instanceD = InstanceD
+#endif
diff --git a/Yesod/Routes/TH/Dispatch.hs b/Yesod/Routes/TH/Dispatch.hs
--- a/Yesod/Routes/TH/Dispatch.hs
+++ b/Yesod/Routes/TH/Dispatch.hs
@@ -176,9 +176,10 @@
                     subDispatcherE <- mdsSubDispatcher
                     runHandlerE <- mdsRunHandler
                     sub <- newName "sub"
+                    let allDyns = extraParams ++ dyns
                     sroute <- newName "sroute"
                     let sub2 = LamE [VarP sub]
-                            (foldl' (\a b -> a `AppE` b) (VarE (mkName getSub) `AppE` VarE sub) dyns)
+                            (foldl' (\a b -> a `AppE` b) (VarE (mkName getSub) `AppE` VarE sub) allDyns)
                     let reqExp' = setPathInfoE `AppE` VarE restPath `AppE` reqExp
                         route' = foldl' AppE (ConE (mkName name)) dyns
                         route = LamE [VarP sroute] $ foldr AppE (AppE route' $ VarE sroute) extraCons
diff --git a/Yesod/Routes/TH/ParseRoute.hs b/Yesod/Routes/TH/ParseRoute.hs
--- a/Yesod/Routes/TH/ParseRoute.hs
+++ b/Yesod/Routes/TH/ParseRoute.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE TemplateHaskell #-}
 module Yesod.Routes.TH.ParseRoute
     ( -- ** ParseRoute
@@ -27,7 +28,7 @@
         (map removeMethods ress)
     helper <- newName "helper"
     fixer <- [|(\f x -> f () x) :: (() -> ([Text], [(Text, Text)]) -> Maybe (Route a)) -> ([Text], [(Text, Text)]) -> Maybe (Route a)|]
-    return $ InstanceD [] (ConT ''ParseRoute `AppT` typ)
+    return $ instanceD [] (ConT ''ParseRoute `AppT` typ)
         [ FunD 'parseRoute $ return $ Clause
             []
             (NormalB $ fixer `AppE` VarE helper)
@@ -42,3 +43,10 @@
 
     fixDispatch (Methods x _) = Methods x []
     fixDispatch x = x
+
+instanceD :: Cxt -> Type -> [Dec] -> Dec
+#if MIN_VERSION_template_haskell(2,11,0)
+instanceD = InstanceD Nothing
+#else
+instanceD = InstanceD
+#endif
diff --git a/Yesod/Routes/TH/RenderRoute.hs b/Yesod/Routes/TH/RenderRoute.hs
--- a/Yesod/Routes/TH/RenderRoute.hs
+++ b/Yesod/Routes/TH/RenderRoute.hs
@@ -8,6 +8,9 @@
     ) where
 
 import Yesod.Routes.TH.Types
+#if MIN_VERSION_template_haskell(2,11,0)
+import Language.Haskell.TH (conT)
+#endif
 import Language.Haskell.TH.Syntax
 import Data.Maybe (maybeToList)
 import Control.Monad (replicateM)
@@ -15,19 +18,20 @@
 import Web.PathPieces (PathPiece (..), PathMultiPiece (..))
 import Yesod.Routes.Class
 #if __GLASGOW_HASKELL__ < 710
+import Control.Applicative ((<$>))
 import Data.Monoid (mconcat)
 #endif
 
 -- | Generate the constructors of a route data type.
-mkRouteCons :: [ResourceTree Type] -> ([Con], [Dec])
-mkRouteCons =
-    mconcat . map mkRouteCon
+mkRouteCons :: [ResourceTree Type] -> Q ([Con], [Dec])
+mkRouteCons rttypes =
+    mconcat <$> mapM mkRouteCon rttypes
   where
     mkRouteCon (ResourceLeaf res) =
-        ([con], [])
+        return ([con], [])
       where
         con = NormalC (mkName $ resourceName res)
-            $ map (\x -> (NotStrict, x))
+            $ map (\x -> (notStrict, x))
             $ concat [singles, multi, sub]
         singles = concatMap toSingle $ resourcePieces res
         toSingle Static{} = []
@@ -39,14 +43,19 @@
             case resourceDispatch res of
                 Subsite { subsiteType = typ } -> [ConT ''Route `AppT` typ]
                 _ -> []
-    mkRouteCon (ResourceParent name _check pieces children) =
-        ([con], dec : decs)
+
+    mkRouteCon (ResourceParent name _check pieces children) = do
+        (cons, decs) <- mkRouteCons children
+#if MIN_VERSION_template_haskell(2,11,0)
+        dec <- DataD [] (mkName name) [] Nothing cons <$> mapM conT [''Show, ''Read, ''Eq]
+#else
+        let dec = DataD [] (mkName name) [] cons [''Show, ''Read, ''Eq]
+#endif
+        return ([con], dec : decs)
       where
-        (cons, decs) = mkRouteCons children
         con = NormalC (mkName name)
-            $ map (\x -> (NotStrict, x))
+            $ map (\x -> (notStrict, x))
             $ concat [singles, [ConT $ mkName name]]
-        dec = DataD [] (mkName name) [] cons [''Show, ''Read, ''Eq]
 
         singles = concatMap toSingle pieces
         toSingle Static{} = []
@@ -143,10 +152,30 @@
 mkRenderRouteInstance' :: Cxt -> Type -> [ResourceTree Type] -> Q [Dec]
 mkRenderRouteInstance' cxt typ ress = do
     cls <- mkRenderRouteClauses ress
-    let (cons, decs) = mkRouteCons ress
-    return $ InstanceD cxt (ConT ''RenderRoute `AppT` typ)
-        [ DataInstD [] ''Route [typ] cons clazzes
+    (cons, decs) <- mkRouteCons ress
+#if MIN_VERSION_template_haskell(2,11,0)
+    did <- DataInstD [] ''Route [typ] Nothing cons <$> mapM conT clazzes
+#else
+    let did = DataInstD [] ''Route [typ] cons clazzes
+#endif
+    return $ instanceD cxt (ConT ''RenderRoute `AppT` typ)
+        [ did
         , FunD (mkName "renderRoute") cls
         ] : decs
   where
     clazzes = [''Show, ''Eq, ''Read]
+
+#if MIN_VERSION_template_haskell(2,11,0)
+notStrict :: Bang
+notStrict = Bang NoSourceUnpackedness NoSourceStrictness
+#else
+notStrict :: Strict
+notStrict = NotStrict
+#endif
+
+instanceD :: Cxt -> Type -> [Dec] -> Dec
+#if MIN_VERSION_template_haskell(2,11,0)
+instanceD = InstanceD Nothing
+#else
+instanceD = InstanceD
+#endif
diff --git a/Yesod/Routes/TH/RouteAttrs.hs b/Yesod/Routes/TH/RouteAttrs.hs
--- a/Yesod/Routes/TH/RouteAttrs.hs
+++ b/Yesod/Routes/TH/RouteAttrs.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE RecordWildCards #-}
 module Yesod.Routes.TH.RouteAttrs
@@ -13,7 +14,7 @@
 mkRouteAttrsInstance :: Type -> [ResourceTree a] -> Q Dec
 mkRouteAttrsInstance typ ress = do
     clauses <- mapM (goTree id) ress
-    return $ InstanceD [] (ConT ''RouteAttrs `AppT` typ)
+    return $ instanceD [] (ConT ''RouteAttrs `AppT` typ)
         [ FunD 'routeAttrs $ concat clauses
         ]
 
@@ -36,3 +37,10 @@
         []
   where
     toText s = VarE 'pack `AppE` LitE (StringL s)
+
+instanceD :: Cxt -> Type -> [Dec] -> Dec
+#if MIN_VERSION_template_haskell(2,11,0)
+instanceD = InstanceD Nothing
+#else
+instanceD = InstanceD
+#endif
diff --git a/bench/widget.hs b/bench/widget.hs
--- a/bench/widget.hs
+++ b/bench/widget.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE FlexibleContexts #-}
 -- | BigTable benchmark implemented using Hamlet.
 --
 {-# LANGUAGE QuasiQuotes #-}
diff --git a/test/Hierarchy.hs b/test/Hierarchy.hs
--- a/test/Hierarchy.hs
+++ b/test/Hierarchy.hs
@@ -7,6 +7,7 @@
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE ViewPatterns #-}
+{-# LANGUAGE CPP #-}
 module Hierarchy
     ( hierarchy
     , Dispatcher (..)
@@ -124,7 +125,11 @@
         , mdsUnwrapper = return
         } resources
     return
+#if MIN_VERSION_template_haskell(2,11,0)
+        $ InstanceD Nothing
+#else
         $ InstanceD
+#endif
             []
             (ConT ''Dispatcher
                 `AppT` ConT ''Hierarchy
diff --git a/test/RouteSpec.hs b/test/RouteSpec.hs
--- a/test/RouteSpec.hs
+++ b/test/RouteSpec.hs
@@ -95,7 +95,11 @@
         , mdsUnwrapper = return
         } ress
     return
+#if MIN_VERSION_template_haskell(2,11,0)
+        $ InstanceD Nothing
+#else
         $ InstanceD
+#endif
             []
             (ConT ''Dispatcher
                 `AppT` ConT ''MyApp
diff --git a/test/YesodCoreTest/Exceptions.hs b/test/YesodCoreTest/Exceptions.hs
--- a/test/YesodCoreTest/Exceptions.hs
+++ b/test/YesodCoreTest/Exceptions.hs
@@ -41,7 +41,7 @@
 case500 = runner $ do
     res <- request defaultRequest
     assertStatus 500 res
-    assertBody "FOOBAR" res
+    assertBodyContains "FOOBAR" res
 
 caseRedirect :: IO ()
 caseRedirect = runner $ do
diff --git a/test/YesodCoreTest/WaiSubsite.hs b/test/YesodCoreTest/WaiSubsite.hs
--- a/test/YesodCoreTest/WaiSubsite.hs
+++ b/test/YesodCoreTest/WaiSubsite.hs
@@ -1,22 +1,30 @@
-{-# LANGUAGE CPP, QuasiQuotes, TemplateHaskell, TypeFamilies, MultiParamTypeClasses, OverloadedStrings #-}
+{-# LANGUAGE CPP, QuasiQuotes, TemplateHaskell, TypeFamilies, MultiParamTypeClasses, OverloadedStrings, ViewPatterns #-}
 module YesodCoreTest.WaiSubsite (specs, Widget) where
 
 import YesodCoreTest.YesodTest
 import Yesod.Core
 import qualified Network.HTTP.Types as H
+import Data.ByteString.Lazy (ByteString)
+import qualified Data.ByteString.Lazy as B (concat)
+import qualified Data.ByteString.Lazy.Char8 as B8 (pack)
 
-myApp :: Application
-myApp _ f = f $ responseLBS H.status200 [("Content-type", "text/plain")] "WAI"
+myApp :: ByteString -> Application
+myApp s _ f = f $ responseLBS H.status200 [("Content-type", "text/plain")] s
 
 getApp :: a -> WaiSubsite
-getApp _ = WaiSubsite myApp
+getApp _ = WaiSubsite $ myApp "WAI"
 
+getAppArgs :: a -> Int -> Int -> WaiSubsite
+getAppArgs _ i j = WaiSubsite $ myApp $ B.concat ["WAI - ", B8.pack $ show i, " - ", B8.pack $ show j ]
+
 data Y = Y
 mkYesod "Y" [parseRoutes|
 / RootR GET
 /sub WaiSubsiteR WaiSubsite getApp
 /nested NestedR:
   /sub NestedWaiSubsiteR WaiSubsite getApp
+/nestedargs/#Int NestedArgsR:
+  /sub/#Int NestedArgsWaiSubsiteR WaiSubsite getAppArgs
 |]
 
 instance Yesod Y
@@ -43,3 +51,8 @@
       res <- request defaultRequest { pathInfo = ["nested", "sub", "foo"] }
       assertStatus 200 res
       assertBodyContains "WAI" res
+
+    it "nested subsite with arguments" $ app $ do
+      res <- request defaultRequest { pathInfo = ["nestedargs", "1", "sub", "2", "foo"] }
+      assertStatus 200 res
+      assertBodyContains "WAI - 1 - 2" res
diff --git a/yesod-core.cabal b/yesod-core.cabal
--- a/yesod-core.cabal
+++ b/yesod-core.cabal
@@ -1,5 +1,5 @@
 name:            yesod-core
-version:         1.4.20.1
+version:         1.4.20.2
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
@@ -177,6 +177,7 @@
                   , transformers
                   , yesod-core
                   , blaze-html
+                  , shakespeare
     main-is:        widget.hs
     ghc-options:    -Wall -O2
 
