diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
 # Changelog
 
+## [0.3.0.2] - 2023-10-09
+
+### Added
+
+* Compatiblity with `GHC >= 9.8`.
+
 ## [0.3.0.1] - 2022-08-21
 
 ### Added
diff --git a/LICENSE.md b/LICENSE.md
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,5 +1,5 @@
 # Sydtest License
 
-Copyright (c) 2020-2021 Tom Sydney Kerckhove
+Copyright (c) 2020-2023 Tom Sydney Kerckhove
 
 See the Sydtest License at https://github.com/NorfairKing/sydtest/blob/master/sydtest/LICENSE.md for the full license text.
diff --git a/blog-example/Example/Blog.hs b/blog-example/Example/Blog.hs
--- a/blog-example/Example/Blog.hs
+++ b/blog-example/Example/Blog.hs
@@ -12,6 +12,7 @@
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
 {-# LANGUAGE ViewPatterns #-}
 
diff --git a/src/Test/Syd/Yesod/E2E.hs b/src/Test/Syd/Yesod/E2E.hs
--- a/src/Test/Syd/Yesod/E2E.hs
+++ b/src/Test/Syd/Yesod/E2E.hs
@@ -6,6 +6,8 @@
 {-# LANGUAGE RankNTypes #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE UndecidableInstances #-}
+-- Because we don't need Eq (Route site) in newer versions of Yesod.
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
 
 module Test.Syd.Yesod.E2E where
 
diff --git a/src/Test/Syd/Yesod/Request.hs b/src/Test/Syd/Yesod/Request.hs
--- a/src/Test/Syd/Yesod/Request.hs
+++ b/src/Test/Syd/Yesod/Request.hs
@@ -323,7 +323,11 @@
   matches <- liftClient $ htmlQuery $ scope <> " input[name=_token][type=hidden][value]"
   case matches of
     [] -> liftIO $ expectationFailure "No CSRF token found in the current page"
-    [element] -> addPostParam "_token" $ head $ C.attribute "value" $ YesodTest.parseHTML element
+    [element] -> do
+      t <- case listToMaybe $ C.attribute "value" $ YesodTest.parseHTML element of
+        Nothing -> liftIO $ expectationFailure "Expected a value attribute"
+        Just t -> pure t
+      addPostParam "_token" t
     _ -> liftIO $ expectationFailure "More than one CSRF token found in the page"
 
 -- | Look up the CSRF token from the only form data and add it to the request header
diff --git a/sydtest-yesod.cabal b/sydtest-yesod.cabal
--- a/sydtest-yesod.cabal
+++ b/sydtest-yesod.cabal
@@ -1,18 +1,18 @@
 cabal-version: 1.12
 
--- This file has been generated from package.yaml by hpack version 0.34.7.
+-- This file has been generated from package.yaml by hpack version 0.35.2.
 --
 -- see: https://github.com/sol/hpack
 
 name:           sydtest-yesod
-version:        0.3.0.1
+version:        0.3.0.2
 synopsis:       A yesod companion library for sydtest
 category:       Testing
 homepage:       https://github.com/NorfairKing/sydtest#readme
 bug-reports:    https://github.com/NorfairKing/sydtest/issues
 author:         Tom Sydney Kerckhove
 maintainer:     syd@cs-syd.eu
-copyright:      Copyright (c) 2020-2021 Tom Sydney Kerckhove
+copyright:      Copyright (c) 2020-2023 Tom Sydney Kerckhove
 license:        OtherLicense
 license-file:   LICENSE.md
 build-type:     Simple
@@ -106,7 +106,6 @@
     , conduit
     , cookie
     , http-client
-    , http-types
     , path
     , path-io
     , sydtest
