--- a/tests-ghc-9.4/ErrorTests.hs
+++ b/tests-ghc-9.4/ErrorTests.hs
@@ -13,6 +13,10 @@ import Data.Proxy
 import GHC.TypeLits
 import GHC.TypeLits.Extra
 
+#if __GLASGOW_HASKELL__ >= 901
+import qualified Data.Type.Ord
+#endif
+
 testFail1 :: Proxy (GCD 6 8) -> Proxy 4
 testFail1 = id
 
@@ -213,11 +217,11 @@ testFail23Errors =
 
 testFail24Errors =
 #if __GLASGOW_HASKELL__ >= 912
-  ["Couldn't match type ‘ghc-internal-9.1201.0:GHC.Internal.Data.Type.Ord.OrdCond"
+  ["Couldn't match type ‘Data.Type.Ord.OrdCond"
   ,"(CmpNat z (Max x y)) 'True 'True 'False’"
   ,"with ‘'True’"]
 #elif __GLASGOW_HASKELL__ >= 910
-  ["Couldn't match type ‘ghc-internal-9.1001.0:GHC.Internal.Data.Type.Ord.OrdCond"
+  ["Couldn't match type ‘Data.Type.Ord.OrdCond"
   ,"(CmpNat z (Max x y)) 'True 'True 'False’"
   ,"with ‘'True’"]
 #else
@@ -228,11 +232,11 @@ testFail24Errors =
 
 testFail25Errors =
 #if __GLASGOW_HASKELL__ >= 912
-  ["Couldn't match type ‘ghc-internal-9.1201.0:GHC.Internal.Data.Type.Ord.OrdCond"
+  ["Couldn't match type ‘Data.Type.Ord.OrdCond"
   ,"(CmpNat (x + 1) (Max x y)) 'True 'True 'False’"
   ,"with ‘'True’"]
 #elif __GLASGOW_HASKELL__ >= 910
-  ["Couldn't match type ‘ghc-internal-9.1001.0:GHC.Internal.Data.Type.Ord.OrdCond"
+  ["Couldn't match type ‘Data.Type.Ord.OrdCond"
   ,"(CmpNat (x + 1) (Max x y)) 'True 'True 'False’"
   ,"with ‘'True’"]
 #else
