diff --git a/bits-extra.cabal b/bits-extra.cabal
--- a/bits-extra.cabal
+++ b/bits-extra.cabal
@@ -1,25 +1,19 @@
--- This file has been generated from package.yaml by hpack version 0.27.0.
---
--- see: https://github.com/sol/hpack
---
--- hash: 2b570cc02c2669976f9b6116039e2b03b4942f905bf19228b08ea28cae3edcca
-
-name:           bits-extra
-version:        0.0.1.3
-synopsis:       Useful bitwise operations
-description:    Please see the README on Github at <https://github.com/haskell-works/bits-extra#readme>
-category:       Data, Serialization
-homepage:       https://github.com/haskell-works/bits-extra#readme
-bug-reports:    https://github.com/haskell-works/bits-extra/issues
-author:         John Ky
-maintainer:     newhoggy@gmail.com
-copyright:      2018 John Ky
-license:        BSD3
-license-file:   LICENSE
-build-type:     Simple
-cabal-version:  >= 1.10
-tested-with:    GHC == 8.4.2, GHC == 8.2.2, GHC == 8.0.2, GHC == 7.10.3
+cabal-version:      2.2
 
+name:               bits-extra
+version:            0.0.1.4
+synopsis:           Useful bitwise operations
+description:        Please see the README on Github at <https://github.com/haskell-works/bits-extra#readme>
+category:           Data, Bit
+homepage:           https://github.com/haskell-works/bits-extra#readme
+bug-reports:        https://github.com/haskell-works/bits-extra/issues
+author:             John Ky
+maintainer:         newhoggy@gmail.com
+copyright:          2018-2019 John Ky
+license:            BSD-3-Clause
+license-file:       LICENSE
+tested-with:        GHC == 8.8.1, GHC == 8.6.5, GHC == 8.4.4, GHC == 8.2.2
+build-type:         Simple
 extra-source-files:
     ChangeLog.md
     README.md
@@ -33,7 +27,29 @@
   manual: False
   default: False
 
+common base               { build-depends: base               >= 4.8        && < 5      }
+common criterion          { build-depends: criterion          >= 1.3        && < 1.6    }
+common ghc-prim           { build-depends: ghc-prim           >= 0.5        && < 0.6    }
+common hedgehog           { build-depends: hedgehog           >= 0.5.3      && < 1.1    }
+common hspec              { build-depends: hspec              >= 2.4        && < 2.8    }
+common hw-hedgehog        { build-depends: hw-hedgehog        >= 0.1        && < 0.2    }
+common hw-hspec-hedgehog  { build-depends: hw-hspec-hedgehog  >= 0.1        && < 0.2    }
+common vector             { build-depends: vector             >= 0.12       && < 0.13   }
+
+common config
+  default-language:   Haskell2010
+  ghc-options:        -Wall
+  if (flag(bmi2)) && (impl(ghc >= 8.4.1))
+    ghc-options: -mbmi2 -msse4.2
+    cpp-options: -DBMI2_ENABLED
+
 library
+  import:   base, config
+          , ghc-prim
+          , vector
+  hs-source-dirs:     src
+  ghc-options:        -O2
+  autogen-modules:    Paths_bits_extra
   exposed-modules:
       Data.Bits.BitSize
       Data.Bits.Pdep
@@ -44,55 +60,35 @@
       Data.Bits.Pdep.Prim
       Data.Bits.Pext.Prim
       Paths_bits_extra
-  hs-source-dirs:
-      src
-  ghc-options: -Wall -O2
-  build-depends:
-      base >=4.8 && <5
-    , ghc-prim
-    , vector
-  if (flag(bmi2)) && (impl(ghc >=8.4.1))
-    ghc-options: -mbmi2 -msse4.2
-    cpp-options: -DBMI2_ENABLED
-  default-language: Haskell2010
 
 test-suite bits-extra-test
-  type: exitcode-stdio-1.0
-  main-is: Spec.hs
+  import:   base, config
+          , ghc-prim
+          , hedgehog
+          , hspec
+          , hw-hedgehog
+          , hw-hspec-hedgehog
+  type:               exitcode-stdio-1.0
+  main-is:            Spec.hs
+  hs-source-dirs:     test
+  ghc-options:        -threaded -rtsopts -with-rtsopts=-N
+  autogen-modules:    Paths_bits_extra
+  build-depends:      bits-extra
+  build-tool-depends: hspec-discover:hspec-discover
   other-modules:
       Data.Bits.PdepSpec
       Data.Bits.PextSpec
       Paths_bits_extra
-  hs-source-dirs:
-      test
-  ghc-options: -threaded -rtsopts -with-rtsopts=-N
-  build-depends:
-      base >=4.8 && <5
-    , bits-extra
-    , ghc-prim
-    , hedgehog
-    , hspec
-    , hw-hedgehog
-    , hw-hspec-hedgehog
-  if (flag(bmi2)) && (impl(ghc >=8.4.1))
-    ghc-options: -mbmi2 -msse4.2
-  default-language: Haskell2010
-  build-tool-depends: hspec-discover:hspec-discover
 
 benchmark bench
-  type: exitcode-stdio-1.0
-  main-is: Main.hs
-  other-modules:
-      Paths_bits_extra
-  hs-source-dirs:
-      bench
-  ghc-options: -Wall -O2
-  build-depends:
-      base >=4.8 && <5
-    , bits-extra
-    , criterion
-    , ghc-prim
-    , vector
-  if (flag(bmi2)) && (impl(ghc >=8.4.1))
-    ghc-options: -mbmi2 -msse4.2
-  default-language: Haskell2010
+  import:   base, config
+          , criterion
+          , ghc-prim
+          , vector
+  type:               exitcode-stdio-1.0
+  main-is:            Main.hs
+  other-modules:      Paths_bits_extra
+  autogen-modules:    Paths_bits_extra
+  hs-source-dirs:     bench
+  ghc-options:        -O2
+  build-depends:      bits-extra
diff --git a/test/Data/Bits/PdepSpec.hs b/test/Data/Bits/PdepSpec.hs
--- a/test/Data/Bits/PdepSpec.hs
+++ b/test/Data/Bits/PdepSpec.hs
@@ -1,11 +1,8 @@
 
 module Data.Bits.PdepSpec (spec) where
 
-import Data.Bits
 import Data.Bits.Pdep
 import Data.Bits.Pdep.Slow
-import Data.Int
-import Data.Word
 import HaskellWorks.Hspec.Hedgehog
 import Hedgehog
 import Test.Hspec
@@ -15,7 +12,7 @@
 
 {-# ANN module ("HLint: ignore Redundant do"        :: String) #-}
 {-# ANN module ("HLint: ignore Reduce duplication"  :: String) #-}
-{-# ANN module ("HLint: redundant bracket"          :: String) #-}
+{-# ANN module ("HLint: ignore Redundant bracket"   :: String) #-}
 
 spec :: Spec
 spec = describe "Data.Bits.PdepSpec" $ do
diff --git a/test/Data/Bits/PextSpec.hs b/test/Data/Bits/PextSpec.hs
--- a/test/Data/Bits/PextSpec.hs
+++ b/test/Data/Bits/PextSpec.hs
@@ -1,10 +1,7 @@
 module Data.Bits.PextSpec (spec) where
 
-import Data.Bits
 import Data.Bits.Pext
 import Data.Bits.Pext.Slow
-import Data.Int
-import Data.Word
 import HaskellWorks.Hspec.Hedgehog
 import Hedgehog
 import Test.Hspec
@@ -14,7 +11,7 @@
 
 {-# ANN module ("HLint: ignore Redundant do"        :: String) #-}
 {-# ANN module ("HLint: ignore Reduce duplication"  :: String) #-}
-{-# ANN module ("HLint: redundant bracket"          :: String) #-}
+{-# ANN module ("HLint: ignore Redundant bracket"   :: String) #-}
 
 spec :: Spec
 spec = describe "Data.Bits.PextSpec" $ do
