diff --git a/gen/HaskellWorks/Data/BalancedParens/Gen.hs b/gen/HaskellWorks/Data/BalancedParens/Gen.hs
--- a/gen/HaskellWorks/Data/BalancedParens/Gen.hs
+++ b/gen/HaskellWorks/Data/BalancedParens/Gen.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE TupleSections #-}
 
 module HaskellWorks.Data.BalancedParens.Gen
@@ -16,6 +17,7 @@
 import Data.Coerce
 import Data.Semigroup                             ((<>))
 import Data.Word
+import GHC.Generics
 import HaskellWorks.Data.BalancedParens.ParensSeq (ParensSeq)
 import HaskellWorks.Data.Positioning
 import Hedgehog
@@ -33,7 +35,7 @@
 
 data LR a = L a Int | R a Int deriving (Eq, Show)
 
-newtype BP = BP [Bool] deriving Eq
+newtype BP = BP [Bool] deriving (Eq, Generic)
 
 showBps :: [Bool] -> String
 showBps = fmap fromBool
diff --git a/hw-balancedparens.cabal b/hw-balancedparens.cabal
--- a/hw-balancedparens.cabal
+++ b/hw-balancedparens.cabal
@@ -1,7 +1,7 @@
 cabal-version:  2.2
 
 name:           hw-balancedparens
-version:        0.3.0.0
+version:        0.3.0.1
 synopsis:       Balanced parentheses
 description:    Balanced parentheses.
 category:       Data, Bit, Succinct Data Structures, Data Structures
@@ -26,13 +26,13 @@
 common criterion          { build-depends: criterion            >= 1.2      && < 1.6    }
 common deepseq            { build-depends: deepseq              >= 1.4.2.0  && < 1.5    }
 common hedgehog           { build-depends: hedgehog             >= 1.0      && < 1.1    }
-common hspec              { build-depends: hspec                >= 2.2      && < 2.6    }
+common hspec              { build-depends: hspec                >= 2.2      && < 3.0    }
 common hw-hspec-hedgehog  { build-depends: hw-hspec-hedgehog    >= 0.1      && < 0.2    }
 common hw-bits            { build-depends: hw-bits              >= 0.4.0.0  && < 0.8    }
 common hw-excess          { build-depends: hw-excess            >= 0.2.2.0  && < 0.3    }
 common hw-fingertree      { build-depends: hw-fingertree        >= 0.1.1.0  && < 0.2    }
 common hw-prim            { build-depends: hw-prim              >= 0.6.2.25 && < 0.7    }
-common hw-rankselect-base { build-depends: hw-rankselect-base   >= 0.2.0.0  && < 0.4    }
+common hw-rankselect-base { build-depends: hw-rankselect-base   >= 0.3.2.1  && < 0.4    }
 common transformers       { build-depends: transformers         >= 0.5.6.2  && < 0.6    }
 common vector             { build-depends: vector               >= 0.12     && < 0.13   }
 
diff --git a/src/HaskellWorks/Data/BalancedParens/Internal/RoseTree.hs b/src/HaskellWorks/Data/BalancedParens/Internal/RoseTree.hs
--- a/src/HaskellWorks/Data/BalancedParens/Internal/RoseTree.hs
+++ b/src/HaskellWorks/Data/BalancedParens/Internal/RoseTree.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE DeriveGeneric #-}
+
 module HaskellWorks.Data.BalancedParens.Internal.RoseTree
   ( RoseTree(..)
   , toBools
@@ -6,9 +8,11 @@
   , depth
   ) where
 
+import GHC.Generics
+
 newtype RoseTree = RoseTree
   { children :: [RoseTree]
-  } deriving (Eq, Show)
+  } deriving (Eq, Show, Generic)
 
 toBools :: RoseTree -> [Bool]
 toBools rt = toBools' rt []
diff --git a/src/HaskellWorks/Data/BalancedParens/Simple.hs b/src/HaskellWorks/Data/BalancedParens/Simple.hs
--- a/src/HaskellWorks/Data/BalancedParens/Simple.hs
+++ b/src/HaskellWorks/Data/BalancedParens/Simple.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DeriveGeneric              #-}
 {-# LANGUAGE FlexibleInstances          #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 
@@ -6,6 +7,7 @@
   ) where
 
 import Control.Monad
+import GHC.Generics
 import HaskellWorks.Data.BalancedParens.BalancedParens
 import HaskellWorks.Data.BalancedParens.CloseAt
 import HaskellWorks.Data.BalancedParens.Enclose
@@ -22,7 +24,7 @@
 import Prelude                                         as P
 
 newtype SimpleBalancedParens a = SimpleBalancedParens a
-  deriving (BalancedParens, FindOpen, FindClose, Enclose, OpenAt, CloseAt, BitLength, BitShow, Eq, Rank0, Rank1, Select0, Select1, TestBit)
+  deriving (BalancedParens, FindOpen, FindClose, Enclose, OpenAt, CloseAt, BitLength, BitShow, Eq, Rank0, Rank1, Select0, Select1, TestBit, Generic)
 
 instance Functor SimpleBalancedParens where
   fmap f (SimpleBalancedParens a) = SimpleBalancedParens (f a)
diff --git a/test/HaskellWorks/Data/BalancedParens/Internal/BroadwordSpec.hs b/test/HaskellWorks/Data/BalancedParens/Internal/BroadwordSpec.hs
--- a/test/HaskellWorks/Data/BalancedParens/Internal/BroadwordSpec.hs
+++ b/test/HaskellWorks/Data/BalancedParens/Internal/BroadwordSpec.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DeriveGeneric              #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE OverloadedStrings          #-}
 {-# LANGUAGE ScopedTypeVariables        #-}
@@ -5,6 +6,7 @@
 module HaskellWorks.Data.BalancedParens.Internal.BroadwordSpec where
 
 import Data.Word
+import GHC.Generics
 import HaskellWorks.Data.BalancedParens.FindClose
 import HaskellWorks.Data.Bits.BitShow
 import HaskellWorks.Data.Bits.Broadword
@@ -21,7 +23,7 @@
 {-# ANN module ("HLint: Ignore Redundant do"        :: String) #-}
 {-# ANN module ("HLint: Ignore Reduce duplication"  :: String) #-}
 
-newtype ShowVector a = ShowVector a deriving (Eq, BitShow)
+newtype ShowVector a = ShowVector a deriving (Eq, BitShow, Generic)
 
 instance BitShow a => Show (ShowVector a) where
   show = bitShow
diff --git a/test/HaskellWorks/Data/BalancedParens/RangeMin2Spec.hs b/test/HaskellWorks/Data/BalancedParens/RangeMin2Spec.hs
--- a/test/HaskellWorks/Data/BalancedParens/RangeMin2Spec.hs
+++ b/test/HaskellWorks/Data/BalancedParens/RangeMin2Spec.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE BangPatterns               #-}
+{-# LANGUAGE DeriveGeneric              #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE OverloadedStrings          #-}
 {-# LANGUAGE ScopedTypeVariables        #-}
@@ -6,6 +7,7 @@
 module HaskellWorks.Data.BalancedParens.RangeMin2Spec where
 
 import Data.Word
+import GHC.Generics
 import HaskellWorks.Data.BalancedParens
 import HaskellWorks.Data.BalancedParens.RangeMin
 import HaskellWorks.Data.Bits.BitShow
@@ -17,7 +19,7 @@
 {-# ANN module ("HLint: Ignore Redundant do"        :: String) #-}
 {-# ANN module ("HLint: Ignore Reduce duplication"  :: String) #-}
 
-newtype ShowVector a = ShowVector a deriving (Eq, BitShow)
+newtype ShowVector a = ShowVector a deriving (Eq, BitShow, Generic)
 
 instance BitShow a => Show (ShowVector a) where
   show = bitShow
diff --git a/test/HaskellWorks/Data/BalancedParens/RangeMinSpec.hs b/test/HaskellWorks/Data/BalancedParens/RangeMinSpec.hs
--- a/test/HaskellWorks/Data/BalancedParens/RangeMinSpec.hs
+++ b/test/HaskellWorks/Data/BalancedParens/RangeMinSpec.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE BangPatterns               #-}
+{-# LANGUAGE DeriveGeneric              #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE OverloadedStrings          #-}
 {-# LANGUAGE ScopedTypeVariables        #-}
@@ -6,6 +7,7 @@
 module HaskellWorks.Data.BalancedParens.RangeMinSpec where
 
 import Data.Word
+import GHC.Generics
 import HaskellWorks.Data.BalancedParens
 import HaskellWorks.Data.BalancedParens.RangeMin
 import HaskellWorks.Data.Bits.BitLength
@@ -23,7 +25,7 @@
 {-# ANN module ("HLint: Ignore Redundant do"        :: String) #-}
 {-# ANN module ("HLint: Ignore Reduce duplication"  :: String) #-}
 
-newtype ShowVector a = ShowVector a deriving (Eq, BitShow)
+newtype ShowVector a = ShowVector a deriving (Eq, BitShow, Generic)
 
 instance BitShow a => Show (ShowVector a) where
   show = bitShow
