diff --git a/Text/TDoc/Core.hs b/Text/TDoc/Core.hs
--- a/Text/TDoc/Core.hs
+++ b/Text/TDoc/Core.hs
@@ -12,7 +12,6 @@
              TypeFamilies, FlexibleInstances, FlexibleContexts, TypeOperators #-}
 module Text.TDoc.Core where
 
-import Data.Monoid
 import Data.Functor.Identity
 import Control.Monad.Trans.Writer
 
diff --git a/Text/TDoc/QQ.hs b/Text/TDoc/QQ.hs
--- a/Text/TDoc/QQ.hs
+++ b/Text/TDoc/QQ.hs
@@ -17,7 +17,6 @@
 import Language.Haskell.TH.Quote
 import Text.TDoc (spanDoc, Star, Span, SpanTag(..), ToChildren(..), ChildOf(..))
 import Data.Char (isSpace)
-import Data.Monoid
 
 frTop :: SpanTag t => Star t Span
 frTop = spanDoc
diff --git a/Text/TDoc/TH.hs b/Text/TDoc/TH.hs
--- a/Text/TDoc/TH.hs
+++ b/Text/TDoc/TH.hs
@@ -32,12 +32,12 @@
 type NodeOpts = [NodeOpt]
 
 mkIs :: Name -> Name -> Dec
-mkIs cl ty = InstanceD [] (ConT cl `AppT` ConT ty) []
+mkIs cl ty = InstanceD Nothing [] (ConT cl `AppT` ConT ty) []
 
 node :: String -> NodeOpts -> [Name] -> [Name] -> Q [Dec]
 node nod opts attrs children
   = return . concat
-    $ [ [ DataD [] nodeNm [] [] []
+    $ [ [ DataD [] nodeNm [] Nothing [] []
         , mkIs ''IsNode nodeNm
         ]
       , [ mkIs ''IsInline nodeNm | Inline `elem` opts ]
@@ -68,7 +68,7 @@
 
 attribute :: Name -> Q [Dec]
 attribute attr = return
-                   [ InstanceD [] (ConT ''IsAttribute `AppT` ConT attr) []
+                   [ InstanceD Nothing [] (ConT ''IsAttribute `AppT` ConT attr) []
                    , mkTagClass attr
                    ]
 
@@ -80,7 +80,7 @@
 
 tagInstance :: Name -> Name -> Dec
 tagInstance tagTy nm =
-  InstanceD [] (ConT nmTagCon `AppT` ConT tagTy)
+  InstanceD Nothing [] (ConT nmTagCon `AppT` ConT tagTy)
             [ValD (VarP nmTagFun) (NormalB (ConE nmTagCon)) []]
   where
     nmBase   = nameBase nm
@@ -88,10 +88,10 @@
     nmTagCon = mkTagName nmBase
 
 mkIsChildOf :: Name -> Name -> Dec
-mkIsChildOf child nod = InstanceD [] (ConT ''IsChildOf `AppT` ConT child `AppT` ConT nod) []
+mkIsChildOf child nod = InstanceD Nothing [] (ConT ''IsChildOf `AppT` ConT child `AppT` ConT nod) []
 
 mkIsAttributeOf :: Name -> Name -> Dec
-mkIsAttributeOf attr nod = InstanceD [] (ConT ''IsAttributeOf `AppT` ConT attr `AppT` ConT nod) []
+mkIsAttributeOf attr nod = InstanceD Nothing [] (ConT ''IsAttributeOf `AppT` ConT attr `AppT` ConT nod) []
 
 nodeChildren :: Name -> [Name] -> Q [Dec]
 nodeChildren nod = return . map (`mkIsChildOf` nod)
diff --git a/tdoc.cabal b/tdoc.cabal
--- a/tdoc.cabal
+++ b/tdoc.cabal
@@ -1,6 +1,6 @@
 name:            tdoc
 cabal-Version:   >=1.2
-version:         0.4.6
+version:         0.4.7
 license:         BSD3
 license-file:    LICENSE
 copyright:       (c) Nicolas Pouillard
@@ -15,7 +15,7 @@
 
 library
   build-depends:   base>=3.0&&<5, transformers,
-                   template-haskell >= 2.5, xhtml, bytestring
+                   template-haskell >= 2.11, xhtml, bytestring
   exposed-modules: Text.TDoc
                    Text.TDoc.Core
                    Text.TDoc.Attributes
