diff --git a/tree-diff.cabal b/tree-diff.cabal
--- a/tree-diff.cabal
+++ b/tree-diff.cabal
@@ -1,6 +1,6 @@
 cabal-version:      2.2
 name:               tree-diff
-version:            0.3.4
+version:            0.3.4.1
 synopsis:           Diffing of (expression) trees.
 category:           Data, Testing
 description:
@@ -50,9 +50,11 @@
    || ==9.0.2
    || ==9.2.8
    || ==9.4.8
-   || ==9.6.5
-   || ==9.8.2
-   || ==9.10.1
+   || ==9.6.7
+   || ==9.8.4
+   || ==9.10.3
+   || ==9.12.2
+   || ==9.14.1
 
 extra-source-files:
   fixtures/exfoo.expr
@@ -65,6 +67,11 @@
   type:     git
   location: https://github.com/phadej/tree-diff.git
 
+flag base-ge-4-17
+  description: @base >=4.17@ (GHC-9.4)
+  default:     True
+  manual:      False
+
 library
   exposed-modules:
     Data.TreeDiff
@@ -80,14 +87,14 @@
 
   -- GHC boot libraries
   build-depends:
-    , base        >=4.12.0.0  && <4.21
+    , base        >=4.12.0.0  && <4.23
     , bytestring  ^>=0.10.8.2 || ^>=0.11.0.0 || ^>=0.12.0.2
-    , containers  ^>=0.6.0.1  || ^>=0.7
+    , containers  ^>=0.6.0.1  || ^>=0.7      || ^>=0.8
     , deepseq     ^>=1.4.4.0  || ^>=1.5.0.0
     , parsec      ^>=3.1.13.0
     , pretty      ^>=1.1.1.0
     , text        ^>=1.2.3.0  || ^>=2.0      || ^>=2.1
-    , time        ^>=1.8.0.2  || ^>=1.9.3    || ^>=1.10     || ^>=1.11 || ^>=1.12
+    , time        ^>=1.8.0.2  || ^>=1.9.3    || ^>=1.10     || ^>=1.11 || ^>=1.12 || ^>=1.14 || ^>=1.16
 
   build-depends:
     , aeson                 ^>=2.2.0.0
@@ -96,7 +103,7 @@
     , hashable              ^>=1.4.4.0  || ^>=1.5.0.0
     , parsers               ^>=0.12.11
     , primitive             ^>=0.9.0.0
-    , QuickCheck            ^>=2.14.2   || ^>=2.15
+    , QuickCheck            ^>=2.14.2   || ^>=2.15    || ^>=2.16.0.0 || ^>=2.18.0.0
     , scientific            ^>=0.3.8.0
     , semialign             ^>=1.3.1
     , strict                ^>=0.5
@@ -106,8 +113,8 @@
     , uuid-types            ^>=1.0.6
     , vector                ^>=0.13.1.0
 
-  if (impl(ghc >=8) && !impl(ghc >=9.4))
-    build-depends: data-array-byte ^>=0.1.0.1
+  if !flag(base-ge-4-17)
+    build-depends: data-array-byte >=0.1.0.1 && <0.2
 
   other-extensions:
     CPP
@@ -122,6 +129,12 @@
   hs-source-dirs:   src
   default-language: Haskell2010
 
+  if flag(base-ge-4-17)
+    build-depends: base >=4.17
+
+  else
+    build-depends: base <4.17
+
 test-suite tree-diff-test
   default-language: Haskell2010
   type:             exitcode-stdio-1.0
@@ -132,13 +145,11 @@
 
   -- dependencies from library
   build-depends:
-    , ansi-terminal
     , ansi-wl-pprint
     , base
     , parsec
     , primitive
     , QuickCheck
-    , tagged
     , tree-diff
     , unordered-containers
 
