diff --git a/Data/Bitstream/Fusion/Monadic.hs b/Data/Bitstream/Fusion/Monadic.hs
--- a/Data/Bitstream/Fusion/Monadic.hs
+++ b/Data/Bitstream/Fusion/Monadic.hs
@@ -24,7 +24,7 @@
 #else
 import Data.Vector.Fusion.Stream.Size
 #endif
-import Prelude hiding ((!!), drop, replicate, take)
+import Prelude hiding ((!!), drop, replicate, take, foldl')
 import Prelude.Unicode
 
 genericLength ∷ (Monad m, Num n) ⇒ Stream m α → m n
diff --git a/bitstream.cabal b/bitstream.cabal
--- a/bitstream.cabal
+++ b/bitstream.cabal
@@ -1,3 +1,4 @@
+cabal-version: 3.0
 Name: bitstream
 Synopsis: Fast, packed, strict and lazy bit streams with stream fusion
 Description:
@@ -6,8 +7,8 @@
         fusion. This is like @bytestring@ but stores bits instead of
         bytes.
 
-Version: 0.3.0.1
-License: PublicDomain
+Version: 0.3.0.2
+License: CC0-1.0
 License-File: COPYING
 Author: PHO <pho at cielonegro dot org>
 Maintainer: PHO <pho at cielonegro dot org>
@@ -16,28 +17,33 @@
 Bug-Reports: https://github.com/phonohawk/bitstream/issues
 Category: Data
 Tested-With: GHC == 7.6.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.2
-Cabal-Version: >= 1.10
 Build-Type: Simple
 Extra-Source-Files:
     AUTHORS
     COPYING
     ChangeLog
 
-Source-Repository head
-    Type: git
-    Location: git://github.com/phonohawk/bitstream.git
-
-Library
+common shared
     Build-Depends:
         base                 == 4.*,
         base-unicode-symbols == 0.2.*,
-        bytestring           >= 0.9 && < 0.11,
-        vector               >= 0.10 && < 0.13
-
+        bytestring           >= 0.9 && < 0.13,
+        vector               >= 0.10 && < 0.14
     if !impl(ghc >= 8.0)
         Build-Depends:
             bifunctors >= 4.1
+    GHC-Options:
+        -Wall
+    Default-Language: Haskell2010
 
+Source-Repository head
+    Type: git
+    Location: https://github.com/phonohawk/bitstream.git
+
+Library
+    import:
+      shared
+
     Exposed-Modules:
         Data.Bitstream
         Data.Bitstream.Fusion
@@ -49,46 +55,30 @@
     Other-Modules:
         Data.Bitstream.Internal
 
-    Default-Language:
-         Haskell2010
-
-    GHC-Options:
-        -Wall
-
 Test-Suite test-strict-bitstream
+    import:
+      shared
+
     Type:    exitcode-stdio-1.0
     Main-Is: Test/Bitstream.hs
     Other-Modules:
         Test.Bitstream.Utils
     Build-Depends:
         QuickCheck           >= 2.5,
-        base                 == 4.*,
-        base-unicode-symbols == 0.2.*,
-        bitstream,
-        bytestring           >= 0.9 && < 0.11,
-        vector               >= 0.10 && < 0.13
-    if !impl(ghc >= 8.0)
-        Build-Depends:
-            bifunctors >= 4.1
-    Default-Language: Haskell2010
+        bitstream
     GHC-Options:
-        -Wall -fno-warn-orphans
+        -fno-warn-orphans
 
 Test-Suite test-lazy-bitstream
+    import:
+      shared
+
     Type:    exitcode-stdio-1.0
     Main-Is: Test/Bitstream/Lazy.hs
     Other-Modules:
         Test.Bitstream.Utils
     Build-Depends:
         QuickCheck           >= 2.5,
-        base                 == 4.*,
-        base-unicode-symbols == 0.2.*,
-        bitstream,
-        bytestring           >= 0.9 && < 0.11,
-        vector               >= 0.10 && < 0.13
-    if !impl(ghc >= 8.0)
-        Build-Depends:
-            bifunctors >= 4.1
-    Default-Language: Haskell2010
+        bitstream
     GHC-Options:
-        -Wall -fno-warn-orphans
+        -fno-warn-orphans
