From cce3400ab64c4c6e0af7a28f4281a5f27b03a896 Mon Sep 17 00:00:00 2001 From: Laurent Rene de Cotret Date: Fri, 29 Nov 2024 11:07:39 -0500 Subject: [PATCH 1/3] Support for GHC 9.10 --- accelerate.cabal | 2 +- src/Data/Array/Accelerate/Pattern/TH.hs | 13 +++++++++++++ src/Data/BitSet.hs | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/accelerate.cabal b/accelerate.cabal index 38f5068e3..de53ff0aa 100644 --- a/accelerate.cabal +++ b/accelerate.cabal @@ -334,7 +334,7 @@ flag nofib library build-depends: - base >= 4.12 && < 4.20 + base >= 4.12 && < 4.21 , ansi-terminal >= 0.6.2 , base-orphans >= 0.3 , bytestring >= 0.10.2 diff --git a/src/Data/Array/Accelerate/Pattern/TH.hs b/src/Data/Array/Accelerate/Pattern/TH.hs index b3f43f4a7..12894084d 100644 --- a/src/Data/Array/Accelerate/Pattern/TH.hs +++ b/src/Data/Array/Accelerate/Pattern/TH.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} -- | @@ -181,7 +182,13 @@ mkConP tn' tvs' con' = do ] r' <- case mf of Nothing -> return r +-- Since template-haskell 2.22, NamespaceSpecifier has been added +-- https://hackage.haskell.org/package/template-haskell-2.22.0.0/changelog +#if MIN_VERSION_template_haskell(2,22,0) + Just f -> return (InfixD f NoNamespaceSpecifier pat : r) +#else Just f -> return (InfixD f pat : r) +#endif return (pat, r') where pat = mkName (':' : nameBase cn) @@ -273,7 +280,13 @@ mkConS tn' tvs' prev' next' tag' con' = do ] r' <- case mf of Nothing -> return r +-- Since template-haskell 2.22, NamespaceSpecifier has been added +-- https://hackage.haskell.org/package/template-haskell-2.22.0.0/changelog +#if MIN_VERSION_template_haskell(2,22,0) + Just f -> return (InfixD f NoNamespaceSpecifier pat : r) +#else Just f -> return (InfixD f pat : r) +#endif return r' where sig = forallT diff --git a/src/Data/BitSet.hs b/src/Data/BitSet.hs index f06169bcf..184bc051d 100644 --- a/src/Data/BitSet.hs +++ b/src/Data/BitSet.hs @@ -14,7 +14,7 @@ module Data.BitSet where import Data.Bits -import Prelude hiding ( foldl, foldr ) +import Prelude hiding ( foldl, foldr, foldl' ) import qualified Data.List as List import GHC.Exts ( IsList, build ) From 13a608e7e835fcb1b0baff27ca278270eaf35810 Mon Sep 17 00:00:00 2001 From: Laurent Rene de Cotret Date: Fri, 29 Nov 2024 11:12:06 -0500 Subject: [PATCH 2/3] Added GHC 9.8 and 9.10 to CI --- .github/workflows/ci.yml | 2 ++ accelerate.cabal | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 433d6c2a2..a8c7dd5d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,8 @@ jobs: - "ARM64" ghc: - 'latest' + - '9.10' + - '9.8' - '9.6' - '9.4' - '9.2' diff --git a/accelerate.cabal b/accelerate.cabal index de53ff0aa..b98d8bbb9 100644 --- a/accelerate.cabal +++ b/accelerate.cabal @@ -356,7 +356,7 @@ library , prettyprinter-ansi-terminal >= 1.1.2 , primitive >= 0.6.4 , tasty >= 0.11 - , template-haskell + , template-haskell < 2.23 , terminal-size >= 0.3 , text >= 1.2.4 , transformers >= 0.3 From 2e32777b162994c471f00364d3fd3518799fa017 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sat, 30 Nov 2024 09:48:56 +0100 Subject: [PATCH 3/3] Add comment about raised Prelude(foldl') import warning --- src/Data/BitSet.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Data/BitSet.hs b/src/Data/BitSet.hs index 184bc051d..a3d18c1ae 100644 --- a/src/Data/BitSet.hs +++ b/src/Data/BitSet.hs @@ -14,6 +14,7 @@ module Data.BitSet where import Data.Bits +-- foldl' is exported by Prelude from GHC 9.10 import Prelude hiding ( foldl, foldr, foldl' ) import qualified Data.List as List