diff --git a/CHANGELOG.md b/CHANGELOG.md index e65d1ef..2a3f95c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### next [????.??.??] +* Support building with `template-haskell-2.22.*` (GHC 9.10). + ### 0.6.5 [2023.08.06] * When generating `Show(1)(2)` instances with `Text.Show.Deriving` using GHC 9.8 or later, data types that have fields of type `Int{8,16,32,64}#` or diff --git a/deriving-compat.cabal b/deriving-compat.cabal index 4655306..83bc513 100644 --- a/deriving-compat.cabal +++ b/deriving-compat.cabal @@ -151,7 +151,7 @@ library , semigroups >= 0.6 && < 0.21 if flag(template-haskell-2-11) - build-depends: template-haskell >= 2.11 && < 2.22 + build-depends: template-haskell >= 2.11 && < 2.23 , ghc-boot-th else build-depends: template-haskell >= 2.5 && < 2.11 @@ -190,7 +190,7 @@ test-suite spec , hspec >= 1.8 , QuickCheck >= 2 && < 3 , tagged >= 0.7 && < 1 - , template-haskell >= 2.5 && < 2.22 + , template-haskell >= 2.5 && < 2.23 , void >= 0.5.10 && < 1 build-tool-depends: hspec-discover:hspec-discover >= 1.8 diff --git a/src/Data/Functor/Deriving/Internal.hs b/src/Data/Functor/Deriving/Internal.hs index d409da1..e8e1565 100644 --- a/src/Data/Functor/Deriving/Internal.hs +++ b/src/Data/Functor/Deriving/Internal.hs @@ -838,7 +838,7 @@ mkSimpleLam :: (Exp -> Q Exp) -> Q Exp mkSimpleLam lam = do n <- newName "n" body <- lam (VarE n) - return $ LamE [VarP n] body + lamE [varP n] (return body) -- Make a 'LamE' using two fresh variables. mkSimpleLam2 :: (Exp -> Exp -> Q Exp) -> Q Exp @@ -846,7 +846,7 @@ mkSimpleLam2 lam = do n1 <- newName "n1" n2 <- newName "n2" body <- lam (VarE n1) (VarE n2) - return $ LamE [VarP n1, VarP n2] body + lamE [varP n1, varP n2] (return body) -- "Con a1 a2 a3 -> fold [x1 a1, x2 a2, x3 a3]" --