diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,8 @@
+Changes from 0.8.7 to 0.8.8
+---------------------------
+
+* Added support GHC 9.4, Cabal 3.8
+
 Changes from 0.8.6 to 0.8.7
 ---------------------------
 
diff --git a/Data/Encoding/Preprocessor/Mapping.hs b/Data/Encoding/Preprocessor/Mapping.hs
--- a/Data/Encoding/Preprocessor/Mapping.hs
+++ b/Data/Encoding/Preprocessor/Mapping.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 module Data.Encoding.Preprocessor.Mapping where
 
 import Distribution.Simple.PreProcess
@@ -69,6 +70,10 @@
 mappingPreprocessor :: PreProcessor
 mappingPreprocessor = PreProcessor
                   {platformIndependent = True
+#if MIN_VERSION_Cabal(3,8,0)
+                  ,ppOrdering=unsorted
+#endif
+
                   ,runPreProcessor = \(sbase,sfile) (tbase,tfile) verb -> do
                                        let (dir,fn) = splitFileName sfile
                                        let (bname,ext) = splitExtensions fn
diff --git a/Data/Encoding/Preprocessor/XMLMappingBuilder.hs b/Data/Encoding/Preprocessor/XMLMappingBuilder.hs
--- a/Data/Encoding/Preprocessor/XMLMappingBuilder.hs
+++ b/Data/Encoding/Preprocessor/XMLMappingBuilder.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE ParallelListComp #-}
+{-# LANGUAGE ParallelListComp, CPP #-}
 module Data.Encoding.Preprocessor.XMLMappingBuilder where
 
 import Data.Word
@@ -19,6 +19,9 @@
 xmlPreprocessor :: PreProcessor
 xmlPreprocessor = PreProcessor
                   { platformIndependent = True
+#if MIN_VERSION_Cabal(3,8,0)
+                  , ppOrdering=unsorted
+#endif
                   , runPreProcessor = \src trg verb -> do
                                         createModuleFromFile src trg
                   }
diff --git a/Data/Static.hs b/Data/Static.hs
--- a/Data/Static.hs
+++ b/Data/Static.hs
@@ -36,16 +36,26 @@
 
 instance StaticElement (Maybe Char) where
     extract addr i = let !v = indexWord32OffAddr# addr i
-#if __GLASGOW_HASKELL__ >= 708
+#if __GLASGOW_HASKELL__ < 708
+                     in if eqWord# v (int2Word# 4294967295#) -- -1 in Word32
+#elif __GLASGOW_HASKELL__ < 902
                      in if isTrue# (eqWord# v (int2Word# 4294967295#)) -- -1 in Word32
 #else
-                     in if eqWord# v (int2Word# 4294967295#) -- -1 in Word32
+                     in if isTrue# (eqWord32# v (wordToWord32# (int2Word# 4294967295#))) -- -1 in Word32
 #endif
                         then Nothing
+#if __GLASGOW_HASKELL__ < 902
                         else (if (I# (word2Int# v)) > 0x10FFFF
                               then error (show (I# (word2Int# v))++" is not a valid char ("++show (I# i)++")")
                               else Just (chr (I# (word2Int# v)))
                              )
+#else
+                        else (if (I# (int32ToInt# (word32ToInt32# v))) > 0x10FFFF
+                              then error (show (I# (int32ToInt# (word32ToInt32# v)))++" is not a valid char ("++show (I# i)++")")
+                              else Just (chr (I#  (int32ToInt# (word32ToInt32# v))))
+                             )
+#endif
+
     gen Nothing = gen (-1::Word32)
     gen (Just c) = gen (fromIntegral (ord c)::Word32)
 
diff --git a/encoding.cabal b/encoding.cabal
--- a/encoding.cabal
+++ b/encoding.cabal
@@ -1,5 +1,5 @@
 Name:		encoding
-Version:	0.8.7
+Version:	0.8.8
 Author:		Henning Günther
 Maintainer:	daniel@wagner-home.com
 License:	BSD3
@@ -44,10 +44,10 @@
   Build-Depends: array >=0.4 && <0.6,
                  base >=4 && <5,
                  binary >=0.7 && <0.10,
-                 bytestring >=0.9 && <0.11,
+                 bytestring >=0.9 && <0.12,
                  containers >=0.4 && <0.7,
                  extensible-exceptions >=0.1 && <0.2,
-                 ghc-prim >=0.3 && <0.8,
+                 ghc-prim >=0.3 && <0.10,
                  mtl >=2.0 && <2.3,
                  regex-compat >=0.71 && <0.96
 
