diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,14 @@
 
 # Releases
 
+## Hakyll 4.16.2.2 (2024-07-05)
+
+- Bump `tasty-quickcheck` upper bound to 0.12 (contribution by Alexander
+    Batischev)
+- GHC 9.10 compatibility: bump `template-haskell` upper bound to 0.23, fix
+    `foldl'` imports (as the function is now part of `Prelude`) (contribution by
+    David Binder and Alexander Batischev)
+
 ## Hakyll 4.16.2.1 (2024-06-02)
 
 - Fix "thread blocked indefinitely in an MVar operation" errors caused by
diff --git a/hakyll.cabal b/hakyll.cabal
--- a/hakyll.cabal
+++ b/hakyll.cabal
@@ -1,5 +1,5 @@
 Name:    hakyll
-Version: 4.16.2.1
+Version: 4.16.2.2
 
 Synopsis: A static website compiler library
 Description:
@@ -210,7 +210,7 @@
     resourcet            >= 1.1      && < 1.4,
     scientific           >= 0.3.4    && < 0.4,
     tagsoup              >= 0.13.1   && < 0.15,
-    template-haskell     >= 2.14     && < 2.22,
+    template-haskell     >= 2.14     && < 2.23,
     text                 >= 0.11     && < 1.3 || >= 2.0 && < 2.2,
     time                 >= 1.8      && < 1.15,
     time-locale-compat   >= 0.1      && < 0.2,
@@ -290,7 +290,7 @@
     tasty                      >= 0.11 && < 1.6,
     tasty-golden               >= 2.3  && < 2.4,
     tasty-hunit                >= 0.9  && < 0.11,
-    tasty-quickcheck           >= 0.8  && < 0.11,
+    tasty-quickcheck           >= 0.8  && < 0.12,
     -- Copy pasted from hakyll dependencies:
     aeson                >= 1.0      && < 1.6 || >= 2.0 && < 2.3,
     base                 >= 4.12     && < 5,
diff --git a/lib/Hakyll/Core/Runtime.hs b/lib/Hakyll/Core/Runtime.hs
--- a/lib/Hakyll/Core/Runtime.hs
+++ b/lib/Hakyll/Core/Runtime.hs
@@ -1,4 +1,5 @@
 --------------------------------------------------------------------------------
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE RecordWildCards #-}
 module Hakyll.Core.Runtime
     ( run
@@ -18,7 +19,10 @@
 import qualified Data.Graph                    as Graph
 import           Data.IORef                    (IORef)
 import qualified Data.IORef                    as IORef
-import           Data.List                     (foldl', intercalate)
+import           Data.List                     (intercalate)
+#if !(MIN_VERSION_base(4,20,0))
+import           Data.List                     (foldl')
+#endif
 import           Data.Map                      (Map)
 import qualified Data.Map                      as Map
 import           Data.Maybe                    (fromMaybe)
diff --git a/src/Init.hs b/src/Init.hs
--- a/src/Init.hs
+++ b/src/Init.hs
@@ -1,4 +1,5 @@
 --------------------------------------------------------------------------------
+{-# LANGUAGE CPP #-}
 module Main
     ( main
     ) where
@@ -8,7 +9,10 @@
 import           Control.Arrow         (first)
 import           Control.Monad         (forM, forM_)
 import           Data.Char             (isAlphaNum, isNumber)
-import           Data.List             (foldl', intercalate, isPrefixOf)
+import           Data.List             (intercalate, isPrefixOf)
+#if !(MIN_VERSION_base(4,20,0))
+import           Data.List             (foldl')
+#endif
 import           Data.Version          (Version (..))
 import           System.Directory      (canonicalizePath, copyFile,
                                         doesFileExist,
