diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index c05c1a8..c9497f7 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.17.20231010 +# version: 0.19.20240514 # -# REGENDATA ("0.17.20231010",["github","cabal.project"]) +# REGENDATA ("0.19.20240514",["github","cabal.project"]) # name: Haskell-CI on: @@ -28,6 +28,11 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.10.1 + compilerKind: ghc + compilerVersion: 9.10.1 + setup-method: ghcup + allow-failure: false - compiler: ghc-9.8.1 compilerKind: ghc compilerVersion: 9.8.1 @@ -86,18 +91,18 @@ jobs: apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 if [ "${{ matrix.setup-method }}" = ghcup ]; then mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) else apt-add-repository -y 'ppa:hvr/ghc' apt-get update apt-get install -y "$HCNAME" mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) fi env: HCKIND: ${{ matrix.compilerKind }} @@ -117,13 +122,13 @@ jobs: echo "HC=$HC" >> "$GITHUB_ENV" echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" else HC=$HCDIR/bin/$HCKIND echo "HC=$HC" >> "$GITHUB_ENV" echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" fi HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') @@ -182,7 +187,7 @@ jobs: chmod a+x $HOME/.cabal/bin/cabal-plan cabal-plan --version - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: source - name: initial cabal.project for sdist @@ -210,7 +215,7 @@ jobs: echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(haskell-src-meta)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -218,7 +223,7 @@ jobs: $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all cabal-plan - name: restore cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store @@ -248,7 +253,7 @@ jobs: rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - name: save cache - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: always() with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} diff --git a/haskell-src-meta/ChangeLog b/haskell-src-meta/ChangeLog index 8ca8c17..0059f84 100644 --- a/haskell-src-meta/ChangeLog +++ b/haskell-src-meta/ChangeLog @@ -1,3 +1,6 @@ +0.8.14 +- Support for GHC 9.10 (by Troels Henriksen) + 0.8.13 - Support for GHC 9.8 (by Vladislav Zavialov) diff --git a/haskell-src-meta/haskell-src-meta.cabal b/haskell-src-meta/haskell-src-meta.cabal index d7b7e6d..f5b9454 100644 --- a/haskell-src-meta/haskell-src-meta.cabal +++ b/haskell-src-meta/haskell-src-meta.cabal @@ -9,7 +9,7 @@ author: Matt Morrow copyright: (c) Matt Morrow maintainer: danburton.email@gmail.com bug-reports: https://github.com/haskell-party/haskell-src-meta/issues -tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.2, GHC == 9.4.1, GHC == 9.6.1, GHC == 9.8.1 +tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.2, GHC == 9.4.1, GHC == 9.6.1, GHC == 9.8.1, GHC == 9.10.1 synopsis: Parse source to template-haskell abstract syntax. description: The translation from haskell-src-exts abstract syntax to template-haskell abstract syntax isn't 100% complete yet. @@ -22,7 +22,7 @@ library haskell-src-exts >= 1.21 && < 1.24, pretty >= 1.0 && < 1.2, syb >= 0.1 && < 0.8, - template-haskell >= 2.12 && < 2.22, + template-haskell >= 2.12 && < 2.23, th-orphans >= 0.12 && < 0.14 hs-source-dirs: src diff --git a/haskell-src-meta/src/Language/Haskell/Meta/Extensions.hs b/haskell-src-meta/src/Language/Haskell/Meta/Extensions.hs index ae27232..17be84f 100644 --- a/haskell-src-meta/src/Language/Haskell/Meta/Extensions.hs +++ b/haskell-src-meta/src/Language/Haskell/Meta/Extensions.hs @@ -367,6 +367,13 @@ fromExtension e = case e of TH.ExtendedLiterals -> Nothing #endif +-- 2.22.0 --------------------------------------- + +#if MIN_VERSION_template_haskell(2,22,0) + TH.RequiredTypeArguments -> Nothing + TH.ListTuplePuns -> Nothing +#endif + -- NB: when adding a case here, you may also need to update `toExtension` diff --git a/haskell-src-meta/src/Language/Haskell/Meta/Syntax/Translate.hs b/haskell-src-meta/src/Language/Haskell/Meta/Syntax/Translate.hs index d4b45c4..c978fd3 100644 --- a/haskell-src-meta/src/Language/Haskell/Meta/Syntax/Translate.hs +++ b/haskell-src-meta/src/Language/Haskell/Meta/Syntax/Translate.hs @@ -798,7 +798,11 @@ instance ToDecs (Exts.Decl l) where toDecs (Exts.InfixDecl l assoc Nothing ops) = toDecs (Exts.InfixDecl l assoc (Just 9) ops) toDecs (Exts.InfixDecl _ assoc (Just fixity) ops) = +#if MIN_VERSION_template_haskell(2,22,0) + map (\op -> TH.InfixD (TH.Fixity fixity dir) TH.NoNamespaceSpecifier (toName op)) ops +#else map (\op -> TH.InfixD (TH.Fixity fixity dir) (toName op)) ops +#endif where dir = case assoc of Exts.AssocNone _ -> TH.InfixN