From dd640f99352f11b0b0355611bd7407643faa2d0b Mon Sep 17 00:00:00 2001 From: Vekhir <134215107+Vekhir@users.noreply.github.com> Date: Sat, 2 Sep 2023 06:05:23 +0200 Subject: [PATCH] Add Cabal 3.10.1.0 and GHC 9.6.2 (#8) With Cabal 3.10.1.0, readGenericPackageDescription is moved to Distribution.Simple.PackageDescription, leading to import errors 9.6.2 is the most recent supported GHC release. --- .github/workflows/ci.yml | 4 ++-- app/Main.hs | 5 +++++ uusi.cabal | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 517baeb..3b3ddda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - cabal: ["3.2.0.0", "3.4.0.0"] - ghc: ["8.6.5", "8.8.3", "8.10.5", "9.0.1"] + cabal: ["3.2.0.0", "3.4.0.0", "3.10.1.0"] + ghc: ["8.6.5", "8.8.3", "8.10.5", "9.0.1", "9.6.2"] os: [ubuntu-latest, macOS-latest] steps: diff --git a/app/Main.hs b/app/Main.hs index 019d670..f292ee5 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,13 +1,18 @@ {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE CPP #-} module Main (main) where import Control.Monad (unless, when) import qualified Data.Text as T import qualified Data.Text.IO as T +#if !MIN_VERSION_Cabal(3,10,0) import Distribution.PackageDescription.Parsec (readGenericPackageDescription) +#else +import Distribution.Simple.PackageDescription (readGenericPackageDescription) +#endif import Distribution.PackageDescription.PrettyPrint (showGenericPackageDescription) import Distribution.Simple.Utils (findPackageDesc) import Distribution.Uusi.Core diff --git a/uusi.cabal b/uusi.cabal index 509bc44..11d7e33 100644 --- a/uusi.cabal +++ b/uusi.cabal @@ -25,6 +25,7 @@ tested-with: || ==8.8.3 || ==8.10.5 || ==9.0.1 + || ==9.6.2 source-repository head type: git @@ -33,7 +34,7 @@ source-repository head common common-options build-depends: , base >=4.8 && <5 - , Cabal ^>=3.2 || ^>=3.4 + , Cabal ^>=3.2 || ^>=3.4 || ^>=3.10 , text ghc-options: