diff --git a/heterocephalus.cabal b/heterocephalus.cabal
--- a/heterocephalus.cabal
+++ b/heterocephalus.cabal
@@ -1,6 +1,6 @@
 name:                heterocephalus
-version:             1.0.5.3
-synopsis:            A type-safe template engine for working with popular front end development tools
+version:             1.0.5.4
+synopsis:            A type-safe template engine for working with front end development tools
 description:
     Recent front end development tools and languages are growing fast and have
     quite a complicated ecosystem. Few front end developers want to be forced
@@ -34,18 +34,18 @@
                      , Text.Heterocephalus.Parse.Control
                      , Text.Heterocephalus.Parse.Doc
                      , Text.Heterocephalus.Parse.Option
-  build-depends:       base >= 4.7 && < 5
-                     , blaze-html >= 0.8 && < 0.10
-                     , blaze-markup >= 0.7 && < 0.9
+  build-depends:       base >= 4.10 && < 5
+                     , blaze-html >= 0.9
+                     , blaze-markup >= 0.8
                      , containers >= 0.5
-                     , dlist >= 0.7.1.1
-                     , mtl
-                     , parsec >= 3.1 && < 3.2
-                     , shakespeare >= 2.0 && < 2.1
-                     , template-haskell >= 2.7 && < 3
-                     , text >= 1.2 && < 1.3
-                     , transformers
-  ghc-options:         -Wall -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances
+                     , dlist >= 0.8
+                     , mtl >= 2.2
+                     , parsec >= 3.1
+                     , shakespeare >= 2.0
+                     , template-haskell >= 2.12
+                     , text >= 1.2
+                     , transformers >= 0.5
+  ghc-options:         -Wall -Wcompat -Wnoncanonical-monad-instances
   default-language:    Haskell2010
 
 test-suite heterocephalus-test
diff --git a/src/Text/Heterocephalus.hs b/src/Text/Heterocephalus.hs
--- a/src/Text/Heterocephalus.hs
+++ b/src/Text/Heterocephalus.hs
@@ -522,7 +522,14 @@
     go (d, docs) = do
       let d' = derefToExp ((specialOrIdent, VarE 'or) : scope) d
       docs' <- docsToExp set scope docs
-      return $ TupE [d', docs']
+      return $ nonUnaryTupE [d', docs']
+      where
+        nonUnaryTupE :: [Exp] -> Exp
+        nonUnaryTupE es  = TupE $
+#if MIN_VERSION_template_haskell(2,16,0)
+                                 map Just
+#endif
+                                 es
 docToExp set scope (DocCase deref cases) = do
     let exp_ = derefToExp scope deref
     matches <- mapM toMatch cases
