diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,11 +1,15 @@
 Changes
 =======
 
+Version 0.1.2.4
+---------------
+
+Fix build with template-haskell-2.21 (GHC 9.8)
+
 Version 0.1.2.3
 ---------------
 
 Fix build with ghc 9
-
 
 Version 0.1.2.2
 ---------------
diff --git a/data-lens-light.cabal b/data-lens-light.cabal
--- a/data-lens-light.cabal
+++ b/data-lens-light.cabal
@@ -1,8 +1,6 @@
--- Initial data-lens-light.cabal generated by cabal init.  For further
--- documentation, see http://haskell.org/cabal/users-guide/
-
+cabal-version:       >=1.10
 name:                data-lens-light
-version:             0.1.2.3
+version:             0.1.2.4
 synopsis:            Simple lenses, minimum dependencies
 description:         See <https://github.com/feuerbach/data-lens-light/blob/master/README.md>
 homepage:            https://github.com/feuerbach/data-lens-light
@@ -16,7 +14,6 @@
 extra-source-files:
   README.md
   CHANGELOG.md
-cabal-version:       >=1.10
 
 source-repository head
   type:              git
diff --git a/src/Data/Lens/Light/Template.hs b/src/Data/Lens/Light/Template.hs
--- a/src/Data/Lens/Light/Template.hs
+++ b/src/Data/Lens/Light/Template.hs
@@ -27,7 +27,7 @@
 --
 -- For example, given the data type:
 --
--- > data Score = Score { 
+-- > data Score = Score {
 -- >   _p1Score :: Int
 -- > , _p2Score :: Int
 -- > , rounds :: Int
@@ -49,7 +49,7 @@
 makeLenses :: [Name] -> Q [Dec]
 makeLenses = return . concat <=< mapM makeLens
 
--- | 
+-- |
 -- > makeLens a = makeLenses [a]
 --
 -- > $( makeLens ''TypeName )
@@ -58,10 +58,8 @@
 makeLens n = nameMakeLens n stripUnderscore
 
 stripUnderscore :: String -> Maybe String
-stripUnderscore [] = Nothing
-stripUnderscore s 
-   | head s == '_' = Just (tail s)
-   | otherwise = Nothing
+stripUnderscore ('_':t) = Just t
+stripUnderscore _ = Nothing
 
 namedFields :: Con -> [VarStrictType]
 namedFields (RecC _ fs) = fs
@@ -81,7 +79,9 @@
                     _ -> fail $ errmsg t
     decMakeLens t reified namer
 
-#if MIN_VERSION_template_haskell(2,17,0)
+#if MIN_VERSION_template_haskell(2,21,0)
+type TyVarBndr' = TyVarBndr BndrVis
+#elif MIN_VERSION_template_haskell(2,17,0)
 type TyVarBndr' = TyVarBndr ()
 #else
 type TyVarBndr' = TyVarBndr
@@ -158,5 +158,3 @@
          ++ "\n it is not a type declared with 'data' or 'newtype'"
          ++ "\n Did you remember to double-tick the type as in"
          ++ "\n $(makeLenses ''TheType)?"
-
-
