diff --git a/project_template/default/foo.cabal b/project_template/default/foo.cabal
--- a/project_template/default/foo.cabal
+++ b/project_template/default/foo.cabal
@@ -42,7 +42,7 @@
   else
     build-depends:
       base                      >= 4.4      && < 5,
-      lens                      >= 3.7.6    && < 4.1
+      lens                      >= 3.7.6    && < 4.2
 
   if flag(development)
     build-depends:
diff --git a/project_template/tutorial/foo.cabal b/project_template/tutorial/foo.cabal
--- a/project_template/tutorial/foo.cabal
+++ b/project_template/tutorial/foo.cabal
@@ -33,7 +33,7 @@
   else
     build-depends:
       base                      >= 4.4      && < 5,
-      lens                      >= 3.7.6    && < 4.1
+      lens                      >= 3.7.6    && < 4.2
 
   if impl(ghc >= 6.12.0)
     ghc-options: -threaded -Wall -fwarn-tabs -funbox-strict-fields -O2
diff --git a/snap.cabal b/snap.cabal
--- a/snap.cabal
+++ b/snap.cabal
@@ -1,5 +1,5 @@
 name:           snap
-version:        0.13.2.3
+version:        0.13.2.4
 synopsis:       Top-level package for the Snap Web Framework
 description:
     This is the top-level package for the official Snap Framework libraries.
@@ -185,7 +185,7 @@
   else
     build-depends:
       base                      >= 4.4      && < 5,
-      lens                      >= 3.7.6    && < 4.1
+      lens                      >= 3.7.6    && < 4.2
 
   extensions:
     BangPatterns,
@@ -231,7 +231,7 @@
     hashable            (>= 1.1 && < 1.2) || (>= 1.2.0.6 && <1.3),
     old-time            >= 1.0     && < 1.2,
     snap-server         >= 0.9     && < 0.11,
-    template-haskell    >= 2.2     && < 2.9,
+    template-haskell    >= 2.2     && < 2.10,
     text                >= 0.11    && < 1.2
 
   extensions:
diff --git a/src/Snap/Snaplet/Config.hs b/src/Snap/Snaplet/Config.hs
--- a/src/Snap/Snaplet/Config.hs
+++ b/src/Snap/Snaplet/Config.hs
@@ -15,7 +15,9 @@
 -- | AppConfig contains the config options for command line arguments in
 -- snaplet-based apps.
 newtype AppConfig = AppConfig { appEnvironment :: Maybe String }
-
+#if MIN_VERSION_base(4,7,0)
+                  deriving Typeable
+#else
 
 ------------------------------------------------------------------------------
 -- | AppConfig has a manual instance of Typeable due to limitations in the
@@ -29,7 +31,7 @@
 
 instance Typeable AppConfig where
     typeOf _ = mkTyConApp appConfigTyCon []
-
+#endif
 
 ------------------------------------------------------------------------------
 instance Monoid AppConfig where
diff --git a/test/snap-testsuite.cabal b/test/snap-testsuite.cabal
--- a/test/snap-testsuite.cabal
+++ b/test/snap-testsuite.cabal
@@ -66,7 +66,7 @@
   else
     build-depends:
       base                      >= 4.4      && < 5,
-      lens                      >= 3.7.6    && < 4.1
+      lens                      >= 3.7.6    && < 4.2
 
 
   extensions:
@@ -138,7 +138,7 @@
   else
     build-depends:
       base                      >= 4.4      && < 5,
-      lens                      >= 3.7.6    && < 4.1
+      lens                      >= 3.7.6    && < 4.2
 
   extensions:
     BangPatterns,
@@ -220,7 +220,7 @@
   else
     build-depends:
       base                      >= 4.4      && < 5,
-      lens                      >= 3.7.6    && < 4.1
+      lens                      >= 3.7.6    && < 4.2
 
 
   extensions:
