diff --git a/NgxExport.hs b/NgxExport.hs
--- a/NgxExport.hs
+++ b/NgxExport.hs
@@ -61,29 +61,26 @@
 import           Paths_ngx_export (version)
 import           Data.Version
 
-#if MIN_TOOL_VERSION_ghc(8,0,1)
-#define EMPTY_CPROV
-#else
-#define EMPTY_CPROV () =>
-#endif
-
 #if MIN_VERSION_template_haskell(2,11,0)
-#define PLACEHOLDER_BEFORE_CON _
+#define EXTRA_WILDCARD_BEFORE_CON _
 #else
-#define PLACEHOLDER_BEFORE_CON
+#define EXTRA_WILDCARD_BEFORE_CON
 #endif
 
--- FIXME: for some reason this doesn't work for ghc-7.10, and was thus
--- indirectly disabled by build-depends clause 'template-haskell >= 2.11.0.0'
--- in cabal spec file
-pattern I :: EMPTY_CPROV (Num i, Integral a) => i -> a
+#if MIN_TOOL_VERSION_ghc(8,0,1)
+pattern I :: (Num i, Integral a) => i -> a
+#endif
 pattern I i <- (fromIntegral -> i)
 {-# COMPLETE I :: CInt #-}
 
-pattern PtrLen :: EMPTY_CPROV (Num i, Integral a) => Ptr s -> i -> (Ptr s, a)
+#if MIN_TOOL_VERSION_ghc(8,0,1)
+pattern PtrLen :: Num l => Ptr s -> l -> (Ptr s, Int)
+#endif
 pattern PtrLen s l <- (s, I l)
 
-pattern ToBool :: EMPTY_CPROV (Num i, Eq i) => Bool -> i
+#if MIN_TOOL_VERSION_ghc(8,0,1)
+pattern ToBool :: (Num i, Eq i) => Bool -> i
+#endif
 pattern ToBool i <- (toBool -> i)
 {-# COMPLETE ToBool :: CUInt #-}
 
@@ -102,7 +99,7 @@
                                     (B.ByteString, B.ByteString, Int))
 
 let name = mkName "exportType" in do
-    TyConI (DataD _ _ _ PLACEHOLDER_BEFORE_CON cs _) <- reify ''NgxExport
+    TyConI (DataD _ _ _ EXTRA_WILDCARD_BEFORE_CON cs _) <- 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.5
+version:                    0.8.0.6
 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
