diff --git a/Data/Void.hs b/Data/Void.hs
--- a/Data/Void.hs
+++ b/Data/Void.hs
@@ -14,19 +14,18 @@
 
 import Data.Semigroup (Semigroup(..))
 import Data.Ix
-#ifdef GLASGOW_HASKELL > 610
+#ifdef LANGUAGE_DeriveDataTypeable
 import Data.Data
-import Data.Typeable
 #endif
 
-#ifdef GLASGOW_HASKELL < 700
+#if GLASGOW_HASKELL < 700
 data Void = Void !Void 
 #else
 newtype Void = Void Void
 #endif
   deriving 
   ( Eq, Ord, Show, Read
-#ifdef GLASGOW_HASKELL > 610
+#ifdef LANGUAGE_DeriveDataTypeable
   , Data, Typeable
 #endif
   )
diff --git a/void.cabal b/void.cabal
--- a/void.cabal
+++ b/void.cabal
@@ -1,6 +1,6 @@
 name:          void
 category:      Data Structures
-version:       0.5.2
+version:       0.5.3
 license:       BSD3
 cabal-version: >= 1.6
 license-file:  LICENSE
@@ -17,7 +17,14 @@
   type: git
   location: git://github.com/ekmett/void.git
 
+flag DeriveDataTypeable
+  manual: False
+  default: True
+
 library
   build-depends: base >= 3 && < 10, semigroups >= 0.5 && < 0.6
   exposed-modules: Data.Void
   ghc-options: -Wall 
+  if flag(DeriveDataTypeable)
+    extensions: DeriveDataTypeable
+    cpp-options: -DLANGUAGE_DeriveDataTypeable
