From daad7c317d38612fde437bdbcdc9fad26e553be0 Mon Sep 17 00:00:00 2001 From: alexfmpe <2335822+alexfmpe@users.noreply.github.com> Date: Fri, 16 May 2025 03:13:14 +0100 Subject: [PATCH] Support GHC 9.12 (#151) * Test 9.6 and 9.8 in CI * Support GHC 9.10 * Support GHC 9.12 --------- Co-authored-by: Tom Ellis --- .github/workflows/cabal.yml | 2 +- protolude.cabal | 9 ++++++--- src/Protolude/List.hs | 2 +- src/Protolude/Safe.hs | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml index 90968d364..0015f71c3 100644 --- a/.github/workflows/cabal.yml +++ b/.github/workflows/cabal.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ghc: ['9.4.4', '9.2.6', '9.0.2', '8.10.7', '8.8.4', '8.6.5', '8.4.4', '8.2.2', '8.0.2'] + ghc: ['9.12.1', '9.10.1', '9.8.2', '9.6.5', '9.4.4', '9.2.6', '9.0.2', '8.10.7', '8.8.4', '8.6.5', '8.4.4', '8.2.2', '8.0.2'] cabal: ['latest', 3.2] fail-fast: false env: diff --git a/protolude.cabal b/protolude.cabal index 7aae45511..890b1b41f 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -25,6 +25,9 @@ tested-with: || ==9.0.1 || ==9.2.2 || ==9.6.1 + || ==9.8.2 + || ==9.10.1 + || ==9.12.1 extra-source-files: README.md @@ -68,12 +71,12 @@ library build-depends: array >=0.4 && <0.6 , async >=2.0 && <2.3 - , base >=4.6 && <4.20 + , base >=4.6 && <4.22 , bytestring >=0.10 && <0.13 , containers >=0.5 && <0.8 , deepseq >=1.3 && <1.6 - , ghc-prim >=0.3 && <0.12 - , hashable >=1.2 && <1.5 + , ghc-prim >=0.3 && <0.14 + , hashable >=1.2 && <1.6 , mtl >=2.1 && <2.4 , mtl-compat >=0.2 && <0.3 , stm >=2.4 && <2.6 diff --git a/src/Protolude/List.hs b/src/Protolude/List.hs index 9d89a7dac..bd7978bc5 100644 --- a/src/Protolude/List.hs +++ b/src/Protolude/List.hs @@ -20,7 +20,7 @@ import Data.List (groupBy, sortBy) import Data.Maybe (Maybe (Nothing)) import Data.Ord (Ord, comparing) import qualified Data.Set as Set -import GHC.Num ((*), (+), Num) +import Prelude ((*), (+), Num) head :: (Foldable f) => f a -> Maybe a head = foldr (\x _ -> pure x) Nothing diff --git a/src/Protolude/Safe.hs b/src/Protolude/Safe.hs index 471495ffd..a1bdb5efa 100644 --- a/src/Protolude/Safe.hs +++ b/src/Protolude/Safe.hs @@ -35,7 +35,7 @@ import Data.Either (Either(Left, Right)) import Data.Function ((.)) import Data.List (null, head, last, tail, init, maximum, minimum, foldr1, foldl1, foldl1', (++)) -import GHC.Num ((-)) +import Prelude ((-)) import GHC.Show (show) liftMay :: (a -> Bool) -> (a -> b) -> (a -> Maybe b)