diff --git a/CHANGES.markdown b/CHANGES.markdown
--- a/CHANGES.markdown
+++ b/CHANGES.markdown
@@ -1,3 +1,6 @@
+Changes in 0.22.4
+  - Use `-Wno-unused-packages` for GHC `8.10` / `9.0` / `9.2`
+
 Changes in 0.22.3
   - Use `-Wno-unused-packages` when extracting comments
 
@@ -20,7 +23,7 @@
   - GHC 9.4 compatibility. (#382)
 
 Changes in 0.20.0
-  - Allow doctest to be invoked via `cabal repl --with-ghc=doctest`
+  - Allow doctest to be invoked via `cabal repl --with-compiler=doctest`
   - Include `ghc --info` output in `--info`
   - Make `--info` output formatting consistent with GHC
 
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -94,7 +94,7 @@
 
 # Running `doctest` for a Cabal package
 
-The easiest way to run `doctest` for a Cabal package is via `cabal repl --with-ghc=doctest`.
+The easiest way to run `doctest` for a Cabal package is via `cabal repl --with-compiler=doctest`.
 
 This doesn't make a big difference for a simple package, but in more involved
 situations `cabal` will make sure that all dependencies are available and it
@@ -121,7 +121,7 @@
 With a `.cabal` file in place, it is possible to run `doctest` via `cabal repl`:
 
 ```
-$ cabal repl --with-ghc=doctest
+$ cabal repl --with-compiler=doctest
 ...
 Examples: 2  Tried: 2  Errors: 0  Failures: 0
 ```
@@ -139,15 +139,15 @@
   `doctest` with `cabal install doctest --overwrite-policy=always` before each
   invocation ensures that it uses the same version of GHC as is on the `PATH`.
 
-- Technically, `cabal build` is not necessary. `cabal repl --with-ghc=doctest`
+- Technically, `cabal build` is not necessary. `cabal repl --with-compiler=doctest`
   will build any dependencies as needed.  However, it's more robust to run
   `cabal build` first (specifically it is not a good idea to build
-  `ghc-paths` with `--with-ghc=doctest`).
+  `ghc-paths` with `--with-compiler=doctest`).
 
 So a more robust way to call `doctest` is as follows:
 
 ```
-cabal install doctest --overwrite-policy=always && cabal build && cabal repl --build-depends=QuickCheck --build-depends=template-haskell --with-ghc=doctest --repl-options='-w -Wdefault'
+cabal install doctest --ignore-project --overwrite-policy=always && cabal build && cabal repl --build-depends=QuickCheck --build-depends=template-haskell --with-compiler=doctest --repl-options='-w -Wdefault'
 ```
 
 (This is what you want to use on CI.)
@@ -160,7 +160,7 @@
 Example:
 
 ```
-$ cabal repl --with-ghc=doctest --repl-options=--verbose
+$ cabal repl --with-compiler=doctest --repl-options=--verbose
 ### Started execution at src/Fib.hs:7.
 ### example:
 fib 10
@@ -513,7 +513,7 @@
 Add tests for new features, and make sure that the test suite passes with your
 changes.
 
-    cabal build --enable-tests && cabal exec -- cabal test --test-show-details=direct
+    cabal build && cabal exec $(cabal list-bin spec)
 
 
 # Contributors
diff --git a/doctest.cabal b/doctest.cabal
--- a/doctest.cabal
+++ b/doctest.cabal
@@ -5,7 +5,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           doctest
-version:        0.22.3
+version:        0.22.4
 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)
@@ -140,7 +140,7 @@
       Util
       Paths_doctest
   build-depends:
-      base >=4.5 && <5
+      base >=4.7 && <5
     , code-page >=0.1
     , deepseq
     , directory
@@ -152,35 +152,27 @@
     , syb >=0.3
     , transformers
   default-language: Haskell2010
+  if impl(ghc >= 9.0)
+    ghc-options: -fwarn-unused-packages
   if impl(ghc >= 9.8)
     ghc-options: -fno-warn-x-partial
 
 executable doctest
-  main-is: Main.hs
+  main-is: driver/doctest.hs
   other-modules:
       Paths_doctest
   ghc-options: -Wall -threaded
-  hs-source-dirs:
-      driver
   default-extensions:
       NamedFieldPuns
       RecordWildCards
       DeriveFunctor
       NoImplicitPrelude
   build-depends:
-      base >=4.5 && <5
-    , code-page >=0.1
-    , deepseq
-    , directory
+      base >=4.7 && <5
     , doctest
-    , exceptions
-    , filepath
-    , ghc >=8.0 && <9.12
-    , ghc-paths >=0.1.0.9
-    , process
-    , syb >=0.3
-    , transformers
   default-language: Haskell2010
+  if impl(ghc >= 9.0)
+    ghc-options: -fwarn-unused-packages
   if impl(ghc >= 9.8)
     ghc-options: -fno-warn-x-partial
 
@@ -240,7 +232,7 @@
   build-depends:
       HUnit
     , QuickCheck >=2.13.1
-    , base >=4.5 && <5
+    , base >=4.7 && <5
     , code-page >=0.1
     , deepseq
     , directory
@@ -252,11 +244,12 @@
     , hspec-core >=2.3.0
     , mockery
     , process
-    , setenv
     , silently >=1.2.4
     , stringbuilder >=0.4
     , syb >=0.3
     , transformers
   default-language: Haskell2010
+  if impl(ghc >= 9.0)
+    ghc-options: -fwarn-unused-packages
   if impl(ghc >= 9.8)
     ghc-options: -fno-warn-x-partial
diff --git a/driver/Main.hs b/driver/Main.hs
deleted file mode 100644
--- a/driver/Main.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Main (main) where
-
-import           Prelude
-import           Test.DocTest
-import           System.Environment (getArgs)
-
-main :: IO ()
-main = getArgs >>= doctest
diff --git a/driver/doctest.hs b/driver/doctest.hs
new file mode 100644
--- /dev/null
+++ b/driver/doctest.hs
@@ -0,0 +1,8 @@
+module Main (main) where
+
+import           Prelude
+import           Test.DocTest
+import           System.Environment (getArgs)
+
+main :: IO ()
+main = getArgs >>= doctest
diff --git a/src/Interpreter.hs b/src/Interpreter.hs
--- a/src/Interpreter.hs
+++ b/src/Interpreter.hs
@@ -37,7 +37,7 @@
   unless (executable x) $ do
     fail $ ghc ++ " is not executable!"
 
-  maybe False (== "YES") . lookup haveInterpreterKey <$> ghcInfo
+  (== Just "YES") . lookup haveInterpreterKey <$> ghcInfo
 
 withInterpreter
   :: (String, [String])
@@ -50,6 +50,9 @@
 #if __GLASGOW_HASKELL__ >= 802
       , "-fdiagnostics-color=never"
       , "-fno-diagnostics-show-caret"
+#endif
+#if __GLASGOW_HASKELL__ >= 810 && __GLASGOW_HASKELL__ < 904
+      , "-Wno-unused-packages"
 #endif
       ]
   bracket (new defaultConfig{configGhci = command} args) close action
