diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,8 @@
 # Changelog for ghc-lib-parser-ex
 
+## 9.8.0.2 released
+- Fix broken cpp in `isStrictMatch`
+
 ## 9.8.0.1 released
 - New functions `isWildPat`
 
diff --git a/ghc-lib-parser-ex.cabal b/ghc-lib-parser-ex.cabal
--- a/ghc-lib-parser-ex.cabal
+++ b/ghc-lib-parser-ex.cabal
@@ -1,6 +1,6 @@
 cabal-version:  1.18
 name:           ghc-lib-parser-ex
-version:        9.8.0.1
+version:        9.8.0.2
 description:    Please see the README on GitHub at <https://github.com/shayne-fletcher/ghc-lib-parser-ex#readme>
 homepage:       https://github.com/shayne-fletcher/ghc-lib-parser-ex#readme
 bug-reports:    https://github.com/shayne-fletcher/ghc-lib-parser-ex/issues
diff --git a/src/Language/Haskell/GhclibParserEx/GHC/Hs/Expr.hs b/src/Language/Haskell/GhclibParserEx/GHC/Hs/Expr.hs
--- a/src/Language/Haskell/GhclibParserEx/GHC/Hs/Expr.hs
+++ b/src/Language/Haskell/GhclibParserEx/GHC/Hs/Expr.hs
@@ -138,12 +138,12 @@
 isQuasiQuoteSplice = \case HsQuasiQuote{} -> True; _ -> False
 
 #if ( defined (GHC_8_10) || defined (GHC_8_8) )
-isStrictMatch :: HsMatchContext GhcPs -> Bool
-#elif ( defined (GHC_9_8) || defined (GHC_9_6) || defined (GHC_9_4) || defined (GHC_9_2) || defined (GHC_9_0) )
 isStrictMatch :: HsMatchContext RdrName -> Bool
+#elif ( defined (GHC_9_8) || defined (GHC_9_6) || defined (GHC_9_4) || defined (GHC_9_2) || defined (GHC_9_0) )
+isStrictMatch :: HsMatchContext GhcPs -> Bool
 #else
 -- ghc > 9.8.1
-isStrictMatch :: HsMatchContext (GenLocated SrcSpanAnnN RdrName) -> Bool
+isStrictMatch :: HsMatchContext (LocatedN RdrName) -> Bool
 #endif
 isStrictMatch = \case FunRhs{mc_strictness=SrcStrict} -> True; _ -> False
 
diff --git a/test/Test.hs b/test/Test.hs
--- a/test/Test.hs
+++ b/test/Test.hs
@@ -14,6 +14,7 @@
 import qualified System.FilePath as FilePath
 import System.IO.Extra
 import Control.Monad
+import Data.Data
 import Data.List.Extra
 import Data.Maybe
 import Data.Generics.Uniplate.Data
@@ -109,6 +110,7 @@
   , fixityTests
   , extendInstancesTests
   , expressionPredicateTests
+  , declarationPredicateTests
   , typePredicateTests
   , patternPredicateTests
   , dynFlagsTests
@@ -170,6 +172,9 @@
     PFailed _ loc err -> assertFailure (report flags $ unitBag $ mkPlainErrMsg flags loc err)
 #endif
 
+hasS :: (Data x, Data a) => (a -> Bool) -> x -> Bool
+hasS test = any test . universeBi
+
 parseTests :: TestTree
 parseTests = testGroup "Parse tests"
   [
@@ -251,6 +256,12 @@
         POk _ e -> test e
         _ -> assertFailure "parse error"
 
+declTest :: String -> DynFlags -> (LHsDecl GhcPs -> IO ()) -> IO ()
+declTest s flags test =
+      case parseDeclaration s flags of
+        POk _ e -> test e
+        _ -> assertFailure "parse error"
+
 stmtTest :: String -> DynFlags -> (LStmt GhcPs (LHsExpr GhcPs) -> IO ()) -> IO ()
 stmtTest s flags test =
       case parseStatement s flags of
@@ -333,6 +344,17 @@
   where
     assert' = assertBool ""
     test_with_exts exts s = typeTest s (flags exts)
+    flags = foldl' xopt_set basicDynFlags
+
+declarationPredicateTests :: TestTree
+declarationPredicateTests = testGroup "Declaration predicate tests"
+  [
+    testCase "isStrictMatch" $ test "x = e" $ assert' . not . hasS isStrictMatch
+  , testCase "isStrictMatch" $ test "!x = e" $ assert' . hasS isStrictMatch
+  ]
+  where
+    assert' = assertBool ""
+    test s = declTest s (flags [])
     flags = foldl' xopt_set basicDynFlags
 
 expressionPredicateTests :: TestTree
