diff --git a/Data/Derive/Internal/Traversal.hs b/Data/Derive/Internal/Traversal.hs
--- a/Data/Derive/Internal/Traversal.hs
+++ b/Data/Derive/Internal/Traversal.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-
     This module is not written/maintained by the usual Data.Derive author.
 
@@ -27,13 +28,6 @@
 import Control.Applicative
 import Data.Generics.Uniplate.DataOnly
 import Data.Maybe
-
----------------------------------------------------------------------------------
--- Stuff that should be in a library
-
-instance Monoid w => Applicative (Writer w) where
-      pure = return
-      (<*>) = ap
 
 ---------------------------------------------------------------------------------
 -- Information datatype, public interface
diff --git a/Data/Derive/NFData.hs b/Data/Derive/NFData.hs
--- a/Data/Derive/NFData.hs
+++ b/Data/Derive/NFData.hs
@@ -1,6 +1,6 @@
 module Data.Derive.NFData where
 {-
-import "parallel" Control.Parallel.Strategies(NFData, rnf)
+import "deepseq" Control.DeepSeq(NFData, rnf)
 
 example :: Sample
 instance NFData a => NFData (Sample a) where
diff --git a/Data/DeriveTH.hs b/Data/DeriveTH.hs
--- a/Data/DeriveTH.hs
+++ b/Data/DeriveTH.hs
@@ -7,7 +7,6 @@
 -- @
 module Data.DeriveTH(derive, derives, deriveFromDec, module Data.Derive.All) where
 
-import Data.List
 import Control.Monad
 
 import Data.Derive.All
diff --git a/Language/Haskell/TH/Data.hs b/Language/Haskell/TH/Data.hs
--- a/Language/Haskell/TH/Data.hs
+++ b/Language/Haskell/TH/Data.hs
@@ -4,13 +4,11 @@
 -- the derivors.
 module Language.Haskell.TH.Data where
 
-import Data.List
 import Data.Char
 import Data.Generics
 
 import Language.Haskell.TH.Syntax
 import Language.Haskell.TH.Compat
-import Language.Haskell.TH.SYB
 
 
 -- must be one of DataD or NewtypeD
diff --git a/Language/Haskell/TH/ExpandSynonym.hs b/Language/Haskell/TH/ExpandSynonym.hs
--- a/Language/Haskell/TH/ExpandSynonym.hs
+++ b/Language/Haskell/TH/ExpandSynonym.hs
@@ -8,8 +8,6 @@
 import Language.Haskell.TH
 import Language.Haskell.TH.Compat
 import Language.Haskell.TH.Data
-import Language.Haskell.TH.Syntax
-import Language.Haskell.TH.SYB
 import Data.Generics
 
 -- | Expand type synonyms in a data declaration
diff --git a/Language/Haskell/TH/FixedPpr.hs b/Language/Haskell/TH/FixedPpr.hs
--- a/Language/Haskell/TH/FixedPpr.hs
+++ b/Language/Haskell/TH/FixedPpr.hs
@@ -70,7 +70,11 @@
 
 ------------------------------
 instance Ppr Info where
+#if __GLASGOW_HASKELL__ >= 700
+    ppr (ClassI d _) = ppr d
+#else
     ppr (ClassI d) = ppr d
+#endif
     ppr (TyConI d) = ppr d
     ppr (PrimTyConI name arity is_unlifted) 
       = text "Primitive"
diff --git a/Language/Haskell/TH/Helper.hs b/Language/Haskell/TH/Helper.hs
--- a/Language/Haskell/TH/Helper.hs
+++ b/Language/Haskell/TH/Helper.hs
@@ -5,7 +5,6 @@
 --   construction of abstranct syntax trees less tedious.
 module Language.Haskell.TH.Helper where
 
-import Data.List
 import Data.Char
 
 import Language.Haskell.TH.Syntax
diff --git a/Language/Haskell/TH/Peephole.hs b/Language/Haskell/TH/Peephole.hs
--- a/Language/Haskell/TH/Peephole.hs
+++ b/Language/Haskell/TH/Peephole.hs
@@ -1,11 +1,9 @@
-{-# OPTIONS_GHC -fglasgow-exts #-}
--- pattern bindings only
+{-# LANGUAGE PatternGuards #-}
 
 module Language.Haskell.TH.Peephole(peephole, replaceVar, replaceVars) where
 
 import Language.Haskell.TH.Syntax
 import Language.Haskell.TH.Helper
-import Language.Haskell.TH.SYB
 import Data.Generics
 import Data.Maybe
 import Data.List
diff --git a/Language/Haskell/TH/SYB.hs b/Language/Haskell/TH/SYB.hs
deleted file mode 100644
--- a/Language/Haskell/TH/SYB.hs
+++ /dev/null
@@ -1,366 +0,0 @@
-{-# OPTIONS_GHC -cpp -fno-warn-missing-methods -fno-warn-deprecations -fno-warn-unused-imports #-}
-
-module Language.Haskell.TH.SYB where
-
-#ifdef TH_SYB
-import Data.Generics hiding (Fixity)
-import Language.Haskell.TH.Syntax
-import Data.PackedString
-
-instance Data PackedString where gfoldl k z x = z x
-
-
-typename_Name = mkTyCon "Name"
-instance Typeable Name
-    where typeOf _ = mkTyConApp typename_Name ([])
-
-
-
-instance Data Name
-    where gfoldl k z (Name x1 x2) = k (k (z Name) x1) x2
-
-
-
-typename_NameFlavour = mkTyCon "NameFlavour"
-instance Typeable NameFlavour
-    where typeOf _ = mkTyConApp typename_NameFlavour ([])
-
-
-
-instance Data NameFlavour
-    where gfoldl k z x = z x
-
-
-
-typename_NameSpace = mkTyCon "NameSpace"
-instance Typeable NameSpace
-    where typeOf _ = mkTyConApp typename_NameSpace ([])
-
-
-
-instance Data NameSpace
-    where gfoldl k z (VarName) = z VarName
-          gfoldl k z (DataName) = z DataName
-          gfoldl k z (TcClsName) = z TcClsName
-
-
-
-typename_Info = mkTyCon "Info"
-instance Typeable Info
-    where typeOf _ = mkTyConApp typename_Info ([])
-
-
-
-instance Data Info
-    where gfoldl k z (ClassI x1) = k (z ClassI) x1
-          gfoldl k z (ClassOpI x1
-                               x2
-                               x3
-                               x4) = k (k (k (k (z ClassOpI) x1) x2) x3) x4
-          gfoldl k z (TyConI x1) = k (z TyConI) x1
-          gfoldl k z (PrimTyConI x1
-                                 x2
-                                 x3) = k (k (k (z PrimTyConI) x1) x2) x3
-          gfoldl k z (DataConI x1
-                               x2
-                               x3
-                               x4) = k (k (k (k (z DataConI) x1) x2) x3) x4
-          gfoldl k z (VarI x1 x2 x3 x4) = k (k (k (k (z VarI) x1) x2) x3) x4
-          gfoldl k z (TyVarI x1 x2) = k (k (z TyVarI) x1) x2
-
-
-
-typename_Fixity = mkTyCon "Fixity"
-instance Typeable Fixity
-    where typeOf _ = mkTyConApp typename_Fixity ([])
-
-
-
-instance Data Fixity
-    where gfoldl k z (Fixity x1 x2) = k (k (z Fixity) x1) x2
-
-
-
-typename_FixityDirection = mkTyCon "FixityDirection"
-instance Typeable FixityDirection
-    where typeOf _ = mkTyConApp typename_FixityDirection ([])
-
-
-
-instance Data FixityDirection
-    where gfoldl k z (InfixL) = z InfixL
-          gfoldl k z (InfixR) = z InfixR
-          gfoldl k z (InfixN) = z InfixN
-
-
-
-typename_Lit = mkTyCon "Lit"
-instance Typeable Lit
-    where typeOf _ = mkTyConApp typename_Lit ([])
-
-
-
-instance Data Lit
-    where gfoldl k z (CharL x1) = k (z CharL) x1
-          gfoldl k z (StringL x1) = k (z StringL) x1
-          gfoldl k z (IntegerL x1) = k (z IntegerL) x1
-          gfoldl k z (RationalL x1) = k (z RationalL) x1
-          gfoldl k z (IntPrimL x1) = k (z IntPrimL) x1
-          gfoldl k z (FloatPrimL x1) = k (z FloatPrimL) x1
-          gfoldl k z (DoublePrimL x1) = k (z DoublePrimL) x1
-
-
-
-typename_Pat = mkTyCon "Pat"
-instance Typeable Pat
-    where typeOf _ = mkTyConApp typename_Pat ([])
-
-
-
-instance Data Pat
-    where gfoldl k z (LitP x1) = k (z LitP) x1
-          gfoldl k z (VarP x1) = k (z VarP) x1
-          gfoldl k z (TupP x1) = k (z TupP) x1
-          gfoldl k z (ConP x1 x2) = k (k (z ConP) x1) x2
-          gfoldl k z (InfixP x1 x2 x3) = k (k (k (z InfixP) x1) x2) x3
-          gfoldl k z (TildeP x1) = k (z TildeP) x1
-          gfoldl k z (AsP x1 x2) = k (k (z AsP) x1) x2
-          gfoldl k z (WildP) = z WildP
-          gfoldl k z (RecP x1 x2) = k (k (z RecP) x1) x2
-          gfoldl k z (ListP x1) = k (z ListP) x1
-          gfoldl k z (SigP x1 x2) = k (k (z SigP) x1) x2
-
-
-
-typename_Match = mkTyCon "Match"
-instance Typeable Match
-    where typeOf _ = mkTyConApp typename_Match ([])
-
-
-
-instance Data Match
-    where gfoldl k z (Match x1 x2 x3) = k (k (k (z Match) x1) x2) x3
-
-
-
-typename_Clause = mkTyCon "Clause"
-instance Typeable Clause
-    where typeOf _ = mkTyConApp typename_Clause ([])
-
-
-
-instance Data Clause
-    where gfoldl k z (Clause x1 x2 x3) = k (k (k (z Clause) x1) x2) x3
-
-
-
-typename_Exp = mkTyCon "Exp"
-instance Typeable Exp
-    where typeOf _ = mkTyConApp typename_Exp ([])
-
-
-
-instance Data Exp
-    where gfoldl k z (VarE x1) = k (z VarE) x1
-          gfoldl k z (ConE x1) = k (z ConE) x1
-          gfoldl k z (LitE x1) = k (z LitE) x1
-          gfoldl k z (AppE x1 x2) = k (k (z AppE) x1) x2
-          gfoldl k z (InfixE x1 x2 x3) = k (k (k (z InfixE) x1) x2) x3
-          gfoldl k z (LamE x1 x2) = k (k (z LamE) x1) x2
-          gfoldl k z (TupE x1) = k (z TupE) x1
-          gfoldl k z (CondE x1 x2 x3) = k (k (k (z CondE) x1) x2) x3
-          gfoldl k z (LetE x1 x2) = k (k (z LetE) x1) x2
-          gfoldl k z (CaseE x1 x2) = k (k (z CaseE) x1) x2
-          gfoldl k z (DoE x1) = k (z DoE) x1
-          gfoldl k z (CompE x1) = k (z CompE) x1
-          gfoldl k z (ArithSeqE x1) = k (z ArithSeqE) x1
-          gfoldl k z (ListE x1) = k (z ListE) x1
-          gfoldl k z (SigE x1 x2) = k (k (z SigE) x1) x2
-          gfoldl k z (RecConE x1 x2) = k (k (z RecConE) x1) x2
-          gfoldl k z (RecUpdE x1 x2) = k (k (z RecUpdE) x1) x2
-
-
-
-typename_Body = mkTyCon "Body"
-instance Typeable Body
-    where typeOf _ = mkTyConApp typename_Body ([])
-
-
-
-instance Data Body
-    where gfoldl k z (GuardedB x1) = k (z GuardedB) x1
-          gfoldl k z (NormalB x1) = k (z NormalB) x1
-
-
-
-typename_Guard = mkTyCon "Guard"
-instance Typeable Guard
-    where typeOf _ = mkTyConApp typename_Guard ([])
-
-
-
-instance Data Guard
-    where gfoldl k z (NormalG x1) = k (z NormalG) x1
-          gfoldl k z (PatG x1) = k (z PatG) x1
-
-
-
-typename_Stmt = mkTyCon "Stmt"
-instance Typeable Stmt
-    where typeOf _ = mkTyConApp typename_Stmt ([])
-
-
-
-instance Data Stmt
-    where gfoldl k z (BindS x1 x2) = k (k (z BindS) x1) x2
-          gfoldl k z (LetS x1) = k (z LetS) x1
-          gfoldl k z (NoBindS x1) = k (z NoBindS) x1
-          gfoldl k z (ParS x1) = k (z ParS) x1
-
-
-
-typename_Range = mkTyCon "Range"
-instance Typeable Range
-    where typeOf _ = mkTyConApp typename_Range ([])
-
-
-
-instance Data Range
-    where gfoldl k z (FromR x1) = k (z FromR) x1
-          gfoldl k z (FromThenR x1 x2) = k (k (z FromThenR) x1) x2
-          gfoldl k z (FromToR x1 x2) = k (k (z FromToR) x1) x2
-          gfoldl k z (FromThenToR x1
-                                  x2
-                                  x3) = k (k (k (z FromThenToR) x1) x2) x3
-
-
-
-typename_Dec = mkTyCon "Dec"
-instance Typeable Dec
-    where typeOf _ = mkTyConApp typename_Dec ([])
-
-
-
-instance Data Dec
-    where gfoldl k z (FunD x1 x2) = k (k (z FunD) x1) x2
-          gfoldl k z (ValD x1 x2 x3) = k (k (k (z ValD) x1) x2) x3
-          gfoldl k z (DataD x1
-                            x2
-                            x3
-                            x4
-                            x5) = k (k (k (k (k (z DataD) x1) x2) x3) x4) x5
-          gfoldl k z (NewtypeD x1
-                               x2
-                               x3
-                               x4
-                               x5) = k (k (k (k (k (z NewtypeD) x1) x2) x3) x4) x5
-          gfoldl k z (TySynD x1 x2 x3) = k (k (k (z TySynD) x1) x2) x3
-          gfoldl k z (ClassD x1
-                             x2
-                             x3
-                             x4
-                             x5) = k (k (k (k (k (z ClassD) x1) x2) x3) x4) x5
-          gfoldl k z (InstanceD x1 x2 x3) = k (k (k (z InstanceD) x1) x2) x3
-          gfoldl k z (SigD x1 x2) = k (k (z SigD) x1) x2
-          gfoldl k z (ForeignD x1) = k (z ForeignD) x1
-
-
-
-typename_FunDep = mkTyCon "FunDep"
-instance Typeable FunDep
-    where typeOf _ = mkTyConApp typename_FunDep ([])
-
-
-
-instance Data FunDep
-    where gfoldl k z (FunDep x1 x2) = k (k (z FunDep) x1) x2
-
-
-
-typename_Foreign = mkTyCon "Foreign"
-instance Typeable Foreign
-    where typeOf _ = mkTyConApp typename_Foreign ([])
-
-
-
-instance Data Foreign
-    where gfoldl k z (ImportF x1
-                              x2
-                              x3
-                              x4
-                              x5) = k (k (k (k (k (z ImportF) x1) x2) x3) x4) x5
-          gfoldl k z (ExportF x1
-                              x2
-                              x3
-                              x4) = k (k (k (k (z ExportF) x1) x2) x3) x4
-
-
-
-typename_Callconv = mkTyCon "Callconv"
-instance Typeable Callconv
-    where typeOf _ = mkTyConApp typename_Callconv ([])
-
-
-
-instance Data Callconv
-    where gfoldl k z (CCall) = z CCall
-          gfoldl k z (StdCall) = z StdCall
-
-
-
-typename_Safety = mkTyCon "Safety"
-instance Typeable Safety
-    where typeOf _ = mkTyConApp typename_Safety ([])
-
-
-
-instance Data Safety
-    where gfoldl k z (Unsafe) = z Unsafe
-          gfoldl k z (Safe) = z Safe
-          gfoldl k z (Threadsafe) = z Threadsafe
-
-
-
-typename_Strict = mkTyCon "Strict"
-instance Typeable Strict
-    where typeOf _ = mkTyConApp typename_Strict ([])
-
-
-
-instance Data Strict
-    where gfoldl k z (IsStrict) = z IsStrict
-          gfoldl k z (NotStrict) = z NotStrict
-
-
-
-typename_Con = mkTyCon "Con"
-instance Typeable Con
-    where typeOf _ = mkTyConApp typename_Con ([])
-
-
-
-instance Data Con
-    where gfoldl k z (NormalC x1 x2) = k (k (z NormalC) x1) x2
-          gfoldl k z (RecC x1 x2) = k (k (z RecC) x1) x2
-          gfoldl k z (InfixC x1 x2 x3) = k (k (k (z InfixC) x1) x2) x3
-          gfoldl k z (ForallC x1 x2 x3) = k (k (k (z ForallC) x1) x2) x3
-
-
-
-typename_Type = mkTyCon "Type"
-instance Typeable Type
-    where typeOf _ = mkTyConApp typename_Type ([])
-
-
-
-instance Data Type
-    where gfoldl k z (ForallT x1
-                              x2
-                              x3) = k (k (k (z ForallT) x1) x2) x3
-          gfoldl k z (VarT x1) = k (z VarT) x1
-          gfoldl k z (ConT x1) = k (z ConT) x1
-          gfoldl k z (TupleT x1) = k (z TupleT) x1
-          gfoldl k z (ArrowT) = z ArrowT
-          gfoldl k z (ListT) = z ListT
-          gfoldl k z (AppT x1 x2) = k (k (z AppT) x1) x2
-#endif
diff --git a/derive.cabal b/derive.cabal
--- a/derive.cabal
+++ b/derive.cabal
@@ -1,7 +1,7 @@
 Cabal-Version:  >= 1.6
 Build-Type:     Default
 Name:           derive
-Version:        2.3.0.2
+Version:        2.4
 build-type:     Simple
 Copyright:      2006-2010, Neil Mitchell
 Maintainer:     ndmitchell@gmail.com
@@ -35,7 +35,7 @@
 
 Library
     Build-Depends:
-        haskell-src-exts == 1.9.*, filepath, mtl,
+        haskell-src-exts == 1.9.*, filepath, mtl == 2.0.*,
         base == 4.*, syb, template-haskell, uniplate == 1.5.*, containers,
         pretty
 
@@ -60,7 +60,6 @@
         Language.Haskell.TH.FixedPpr
         Language.Haskell.TH.Helper
         Language.Haskell.TH.Peephole
-        Language.Haskell.TH.SYB
 -- GENERATED START
         Data.Derive.Arbitrary
         Data.Derive.ArbitraryOld
diff --git a/derive.htm b/derive.htm
--- a/derive.htm
+++ b/derive.htm
@@ -123,7 +123,7 @@
 <li><b><a href='http://hackage.haskell.org/packages/archive/json/latest/doc/html/Text-JSON.html#t%3AJSON'>JSON</a></b> - from the library <a href='http://hackage.haskell.org/package/json'>json</a></li>
 <li><b><a href='http://hackage.haskell.org/packages/archive/derive/latest/doc/html/Data-Derive-LazySet.html'>LazySet</a></b></li>
 <li><b><a href='http://hackage.haskell.org/packages/archive/base/latest/doc/html/Data-Monoid.html#t%3AMonoid'>Monoid</a></b> - from the library <a href='http://hackage.haskell.org/package/base'>base</a></li>
-<li><b><a href='http://hackage.haskell.org/packages/archive/parallel/latest/doc/html/Control-Parallel-Strategies.html#t%3ANFData'>NFData</a></b> - from the library <a href='http://hackage.haskell.org/package/parallel'>parallel</a></li>
+<li><b><a href='http://hackage.haskell.org/packages/archive/deepseq/latest/doc/html/Control-DeepSeq.html#t%3ANFData'>NFData</a></b> - from the library <a href='http://hackage.haskell.org/package/deepseq'>deepseq</a></li>
 <li><b><a href='http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#t%3AOrd'>Ord</a></b> - from the library <a href='http://hackage.haskell.org/package/base'>base</a></li>
 <li><b><a href='http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#t%3ARead'>Read</a></b> - from the library <a href='http://hackage.haskell.org/package/base'>base</a></li>
 <li><b><a href='http://hackage.haskell.org/packages/archive/derive/latest/doc/html/Data-Derive-Ref.html'>Ref</a></b></li>
