diff --git a/lib/StackageToHackage/Hackage.hs b/lib/StackageToHackage/Hackage.hs index 0939e60..1f5b3fd 100644 --- a/lib/StackageToHackage/Hackage.hs +++ b/lib/StackageToHackage/Hackage.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} @@ -39,7 +40,11 @@ import Data.List.Extra (nubOrd, nubOrdOn, lower, dropPrefix, dropSuffix) import Data.List.NonEmpty (NonEmpty((:|))) import Data.Maybe (fromMaybe, mapMaybe, catMaybes) import Data.Text (Text) +#if MIN_VERSION_Cabal(3, 8, 0) +import Distribution.Simple.PackageDescription (readGenericPackageDescription) +#else import Distribution.PackageDescription.Parsec (readGenericPackageDescription) +#endif import Distribution.Pretty (prettyShow) import Distribution.Types.GenericPackageDescription (GenericPackageDescription(..)) diff --git a/stack.yaml b/stack.yaml index 95bc743..ada9ae3 100644 --- a/stack.yaml +++ b/stack.yaml @@ -2,4 +2,4 @@ resolver: lts-18.28 packages: - . extra-deps: -- hpack-0.35.0@sha256:8cd6146fae269390f41dc7237ebd2c479074d4163806d349a41f5a7751d6cea5,4726 \ No newline at end of file +- hpack-0.36.0@sha256:48f98f1b607bb856acf890fe4e62a600d16961763102e4e8b9bc76349cce05fe,5229 diff --git a/stack2cabal.cabal b/stack2cabal.cabal index 95cbf1a..d1ef0ea 100644 --- a/stack2cabal.cabal +++ b/stack2cabal.cabal @@ -34,7 +34,7 @@ common deps build-depends: , base >=4.13 && <5.0 , bytestring - , Cabal >=3.0 && <3.8 + , Cabal >=3.0 && <3.12 , containers , directory , exceptions ^>=0.10.4 diff --git a/tests/hpack/hpack.cabal b/tests/hpack/hpack.cabal index 9dd11e7..28e996b 100644 --- a/tests/hpack/hpack.cabal +++ b/tests/hpack/hpack.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.5. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack --