From dfd73c44416851c132cb51560bd52ce282c14914 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Thu, 16 Apr 2026 23:25:59 +0300 Subject: [PATCH] Support GHC-9.14 --- .github/workflows/haskell-ci.yml | 30 ++++++++++++++++++++-------- microstache.cabal | 9 ++++----- tests/Text/Microstache/ParserSpec.hs | 2 +- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 55a520d..cee30c0 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.20250115 +# version: 0.19.20260331 # -# REGENDATA ("0.19.20250115",["github","microstache.cabal"]) +# REGENDATA ("0.19.20260331",["github","microstache.cabal"]) # name: Haskell-CI on: @@ -20,10 +20,15 @@ on: pull_request: branches: - master + merge_group: + branches: + - master + workflow_dispatch: + {} jobs: linux: name: Haskell-CI - Linux - ${{ matrix.compiler }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 60 container: @@ -32,6 +37,11 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.12.4 + compilerKind: ghc + compilerVersion: 9.12.4 + setup-method: ghcup + allow-failure: false - compiler: ghc-9.12.1 compilerKind: ghc compilerVersion: 9.12.1 @@ -91,12 +101,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 run: | - "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -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: | @@ -172,7 +182,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 @@ -197,7 +207,11 @@ jobs: touch cabal.project.local echo "packages: ${PKGDIR_microstache}" >> cabal.project echo "package microstache" >> 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 microstache" >> 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 microstache" >> 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/microstache.cabal b/microstache.cabal index 8450d6d..f0e8366 100644 --- a/microstache.cabal +++ b/microstache.cabal @@ -1,7 +1,6 @@ cabal-version: 2.2 name: microstache -version: 1.0.3 -x-revision: 1 +version: 1.0.3.1 license: BSD-3-Clause license-file: LICENSE author: @@ -39,6 +38,7 @@ tested-with: || ==9.6.6 || ==9.8.4 || ==9.10.1 + || ==9.12.4 || ==9.12.1 source-repository head @@ -48,15 +48,14 @@ source-repository head library build-depends: aeson >=2.2.2.0 && <2.3 - , base >=4.12.0.0 && <4.22 - , containers >=0.6.0.1 && <0.8 + , base >=4.12.0.0 && <4.23 + , containers >=0.6.0.1 && <0.9 , deepseq >=1.4.4.0 && <1.6 , directory >=1.3.3.0 && <1.4 , filepath >=1.4.2.1 && <1.6 , parsec >=3.1.13.0 && <3.2 , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2 , transformers >=0.5.6.2 && <0.7 - , unordered-containers >=0.2.20 && <0.3 , vector >=0.13.1.0 && <0.14 exposed-modules: diff --git a/tests/Text/Microstache/ParserSpec.hs b/tests/Text/Microstache/ParserSpec.hs index f4cba32..ff8e8ee 100644 --- a/tests/Text/Microstache/ParserSpec.hs +++ b/tests/Text/Microstache/ParserSpec.hs @@ -105,6 +105,6 @@ shouldParse (Right x) v = unless (x == v) $ expectationFailure $ shouldFailParse :: (Eq a, Show a) => Either ParseError a -> Expectation shouldFailParse (Left _) = pure () -shoulwFailParse (Right x) = expectationFailure $ +shouldFailParse (Right x) = expectationFailure $ "expected parse failure, got " ++ show x