From 2236305bb46251ad9cb0e088e7365ced52c31013 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 2 Jan 2026 20:15:04 +0200 Subject: [PATCH] Support GHC-9.14 --- .github/workflows/haskell-ci.yml | 39 ++++++++++++++++++++------------ OneTuple.cabal | 11 ++++----- cabal.project | 3 +++ 3 files changed, 33 insertions(+), 20 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 37cb1c3..22fd330 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.19.20241220 +# version: 0.19.20260102 # -# REGENDATA ("0.19.20241220",["github","cabal.project"]) +# REGENDATA ("0.19.20260102",["github","cabal.project"]) # name: Haskell-CI on: @@ -20,10 +20,13 @@ on: pull_request: branches: - master + merge_group: + branches: + - master jobs: linux: name: Haskell-CI - Linux - ${{ matrix.compiler }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 60 container: @@ -32,14 +35,19 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.12.1 + - compiler: ghc-9.14.1 + compilerKind: ghc + compilerVersion: 9.14.1 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.12.2 compilerKind: ghc - compilerVersion: 9.12.1 + compilerVersion: 9.12.2 setup-method: ghcup allow-failure: false - - compiler: ghc-9.10.1 + - compiler: ghc-9.10.2 compilerKind: ghc - compilerVersion: 9.10.1 + compilerVersion: 9.10.2 setup-method: ghcup allow-failure: false - compiler: ghc-9.6.4 @@ -86,13 +94,12 @@ jobs: - name: Install GHCup run: | mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" - - name: Install cabal-install (prerelease) + - name: Install cabal-install run: | - "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml; - "$HOME/.ghcup/bin/ghcup" install cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false) - echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV" + "$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV" - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -168,7 +175,7 @@ jobs: chmod a+x $HOME/.cabal/bin/cabal-plan cabal-plan --version - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: path: source - name: initial cabal.project for sdist @@ -193,7 +200,11 @@ jobs: touch cabal.project.local echo "packages: ${PKGDIR_OneTuple}" >> cabal.project echo "package OneTuple" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project + echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package OneTuple" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package OneTuple" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi cat >> cabal.project <> cabal.project.local diff --git a/OneTuple.cabal b/OneTuple.cabal index 82381c1..86f2e50 100644 --- a/OneTuple.cabal +++ b/OneTuple.cabal @@ -1,7 +1,6 @@ cabal-version: 1.12 name: OneTuple -version: 0.4.2 -x-revision: 1 +version: 0.4.2.1 synopsis: Singleton Tuple category: Data description: @@ -31,8 +30,9 @@ tested-with: || ==9.4.8 || ==9.6.4 || ==9.8.6 - || ==9.10.1 - || ==9.12.1 + || ==9.10.2 + || ==9.12.2 + || ==9.14.1 extra-source-files: Changelog.md @@ -49,7 +49,7 @@ library hs-source-dirs: src build-depends: - base >=4.12 && <4.22 + base >=4.12 && <4.23 , template-haskell if impl(ghc >=9.0) @@ -90,4 +90,3 @@ test-suite th build-depends: base , OneTuple - , template-haskell diff --git a/cabal.project b/cabal.project index 7ef286b..a40db9f 100644 --- a/cabal.project +++ b/cabal.project @@ -1,2 +1,5 @@ packages: . tests: True + +package OneTuple + ghc-options: -Wunused-packages