diff --git a/NgxExport.hs b/NgxExport.hs
--- a/NgxExport.hs
+++ b/NgxExport.hs
@@ -71,7 +71,9 @@
 pattern I :: (Num i, Integral a) => i -> a
 #endif
 pattern I i <- (fromIntegral -> i)
+#if MIN_TOOL_VERSION_ghc(8,2,1)
 {-# COMPLETE I :: CInt #-}
+#endif
 
 #if MIN_TOOL_VERSION_ghc(8,0,1)
 pattern PtrLen :: Num l => Ptr s -> l -> (Ptr s, Int)
@@ -82,7 +84,9 @@
 pattern ToBool :: (Num i, Eq i) => Bool -> i
 #endif
 pattern ToBool i <- (toBool -> i)
+#if MIN_TOOL_VERSION_ghc(8,2,1)
 {-# COMPLETE ToBool :: CUInt #-}
+#endif
 
 data NgxExport = SS            (String -> String)
                | SSS           (String -> String -> String)
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.6
+version:                    0.8.0.7
 synopsis:                   Helper module for Nginx haskell module
 description:                Helper module for
         <http://github.com/lyokha/nginx-haskell-module Nginx haskell module>
@@ -31,9 +31,7 @@
   ghc-options:             -Wall
   if impl(ghc < 8.0)
     ghc-options:           -fno-warn-incomplete-patterns
-                           -fno-warn-unrecognised-pragmas
   else
     if impl(ghc < 8.2)
       ghc-options:         -Wno-incomplete-patterns
-                           -Wno-unrecognised-pragmas
 
