diff --git a/ghc-check.cabal b/ghc-check.cabal
--- a/ghc-check.cabal
+++ b/ghc-check.cabal
@@ -1,7 +1,7 @@
 cabal-version:       1.20
 build-type:          Simple
 name:                ghc-check
-version:             0.5.0.7
+version:             0.5.0.8
 synopsis:            detect mismatches between compile-time and run-time versions of the ghc api
 description:         detect mismatches between compile-time and run-time versions of the ghc api
 bug-reports:         https://github.com/pepeiborra/ghc-check/issues
@@ -11,6 +11,8 @@
 maintainer:          pepeiborra@gmail.com
 category:            Development
 extra-source-files:  README.md
+tested-with:         GHC == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4 || == 9.4.1
+
 
 flag ghc-check-use-package-abis
   description: record package abis at compile time for improved precision (requires compile-time TH)
diff --git a/src/GHC/Check/PackageDb.hs b/src/GHC/Check/PackageDb.hs
--- a/src/GHC/Check/PackageDb.hs
+++ b/src/GHC/Check/PackageDb.hs
@@ -34,7 +34,9 @@
   (lookupUnit, explicitUnits,  lookupUnitId,
     lookupPackageName, GenericUnitInfo (..),
     UnitInfo, unitPackageNameString)
+#if !MIN_VERSION_ghc(9,4,0)
 import GHC.Unit.Types (indefUnit)
+#endif
 #elif MIN_VERSION_ghc(9,0,1)
 import GHC
   (unitState,  Ghc,
@@ -77,13 +79,22 @@
 version :: PackageVersion -> Version
 version PackageVersion{ myVersion = MyVersion v} = v
 
+#if MIN_VERSION_ghc(9,4,0)
+indefUnit :: a -> a
+indefUnit = id
+#endif
+
 #if MIN_VERSION_ghc(9,2,0)
 -- | @getPackageVersion p@ returns the version of package @p@ that will be used in the Ghc session.
 getPackageVersion :: String -> Ghc (Maybe PackageVersion)
 getPackageVersion pName = runMaybeT $ do
   hsc_env <- Monad.lift getSession
   let pkgst   = ue_units $ hsc_unit_env hsc_env
-      depends = explicitUnits pkgst
+      depends =
+#if MIN_VERSION_ghc(9,4,0)
+        map fst $
+#endif
+        explicitUnits pkgst
 
   let explicit = do
         pkgs <- traverse (MaybeT . return . lookupUnit pkgst) depends
