diff --git a/CHANGES.markdown b/CHANGES.markdown
--- a/CHANGES.markdown
+++ b/CHANGES.markdown
@@ -1,3 +1,6 @@
+Changes in 0.22.2
+  - GHC 9.8 compatibility
+
 Changes in 0.22.1
   - Add `Test.DocTest.Internal.Run.doctestWithRepl`
 
diff --git a/doctest.cabal b/doctest.cabal
--- a/doctest.cabal
+++ b/doctest.cabal
@@ -1,11 +1,11 @@
 cabal-version: 1.12
 
--- This file has been generated from package.yaml by hpack version 0.35.4.
+-- This file has been generated from package.yaml by hpack version 0.36.0.
 --
 -- see: https://github.com/sol/hpack
 
 name:           doctest
-version:        0.22.1
+version:        0.22.2
 synopsis:       Test interactive Haskell examples
 description:    `doctest` is a tool that checks [examples](https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810775744)
                 and [properties](https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810771856)
@@ -146,12 +146,14 @@
     , directory
     , exceptions
     , filepath
-    , ghc >=8.0 && <9.7
+    , ghc >=8.0 && <9.10
     , ghc-paths >=0.1.0.9
     , process
     , syb >=0.3
     , transformers
   default-language: Haskell2010
+  if impl(ghc >= 9.8)
+    ghc-options: -fno-warn-x-partial
 
 executable doctest
   main-is: Main.hs
@@ -173,12 +175,14 @@
     , doctest
     , exceptions
     , filepath
-    , ghc >=8.0 && <9.7
+    , ghc >=8.0 && <9.10
     , ghc-paths >=0.1.0.9
     , process
     , syb >=0.3
     , transformers
   default-language: Haskell2010
+  if impl(ghc >= 9.8)
+    ghc-options: -fno-warn-x-partial
 
 test-suite spec
   main-is: Spec.hs
@@ -242,7 +246,7 @@
     , directory
     , exceptions
     , filepath
-    , ghc >=8.0 && <9.7
+    , ghc >=8.0 && <9.10
     , ghc-paths >=0.1.0.9
     , hspec >=2.3.0
     , hspec-core >=2.3.0
@@ -254,3 +258,5 @@
     , syb >=0.3
     , transformers
   default-language: Haskell2010
+  if impl(ghc >= 9.8)
+    ghc-options: -fno-warn-x-partial
