diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,8 @@
+### 0.8.0.2
+
+- Removed constraint on *template-haskell* via a CPP macro (this should let
+  compilation for *ghc-7.10*).
+
 ### 0.8.0.0
 
 - Implemented shared services using waitToSetLock to get exclusive access for
diff --git a/NgxExport.hs b/NgxExport.hs
--- a/NgxExport.hs
+++ b/NgxExport.hs
@@ -61,6 +61,12 @@
 import           Paths_ngx_export (version)
 import           Data.Version
 
+#if MIN_VERSION_template_haskell(2,11,0)
+#define DERIV_CLAUSE _
+#else
+#define DERIV_CLAUSE
+#endif
+
 pattern I :: (Num i, Integral a) => i -> a
 pattern I i <- (fromIntegral -> i)
 {-# COMPLETE I :: CInt #-}
@@ -87,7 +93,7 @@
                                     (B.ByteString, B.ByteString, Int))
 
 let name = mkName "exportType" in do
-    TyConI (DataD _ _ _ _ cs _) <- reify ''NgxExport
+    TyConI (DataD _ _ _ _ cs DERIV_CLAUSE) <- reify ''NgxExport
     let cons = map (\(NormalC con [(_, typ)]) -> (con, typ)) cs
     sequence $
         [sigD name [t|NgxExport -> IO CInt|],
diff --git a/ngx-export.cabal b/ngx-export.cabal
--- a/ngx-export.cabal
+++ b/ngx-export.cabal
@@ -1,5 +1,5 @@
 name:                ngx-export
-version:             0.8.0.1
+version:             0.8.0.2
 synopsis:            Helper module for Nginx haskell module
 description:         Helper module for
         <http://github.com/lyokha/nginx-haskell-module Nginx haskell module>
@@ -17,7 +17,7 @@
 
 library
   build-depends:       base >= 4.8 && < 5
-                     , template-haskell >= 2.11.0.0
+                     , template-haskell
                      , bytestring >= 0.10.0.0
                      , monad-loops >= 0.4.2
                      , binary >= 0.8.1.0
@@ -25,6 +25,7 @@
                      , unix
   exposed-modules:     NgxExport
   other-modules:       Paths_ngx_export
+  extensions:          CPP
   ghc-options:         -Wall -Wno-unrecognised-pragmas
   if impl(ghc < 8.2)
     ghc-options:       -Wno-incomplete-patterns
