diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2021-12-01 20:00:52 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-12-09 22:15:00 -0500 |
commit | 724df9c3b5e10ced670a484b05220169aa5bf48c (patch) | |
tree | fa1789bb814d9c9e43247771bc7cbee2d06cf173 /hadrian | |
parent | b6f7d145872573baa632a3bbee1c52f0596ec482 (diff) | |
download | haskell-724df9c3b5e10ced670a484b05220169aa5bf48c.tar.gz |
Hadrian: Allow building with GHC 9.2
A separate issue is the fact that many of `hadrian`'s modules produce
`-Wincomplete-uni-patterns` warnings under 9.2, but that is probably best left
to a separate patch.
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/cabal.project | 2 | ||||
-rw-r--r-- | hadrian/hadrian.cabal | 2 | ||||
-rw-r--r-- | hadrian/src/Hadrian/Haskell/Cabal/Parse.hs | 9 |
3 files changed, 10 insertions, 3 deletions
diff --git a/hadrian/cabal.project b/hadrian/cabal.project index ed0e5f768e..fba50cd81c 100644 --- a/hadrian/cabal.project +++ b/hadrian/cabal.project @@ -1,7 +1,7 @@ packages: ./ -- This essentially freezes the build plan for hadrian -index-state: 2021-03-03T13:52:16Z +index-state: 2021-11-29T22:22:49Z -- N.B. Compile with -O0 since this is not a performance-critical executable -- and the Cabal takes nearly twice as long to build with -O1. See #16817. diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal index aaedeca80c..1fd2787a5b 100644 --- a/hadrian/hadrian.cabal +++ b/hadrian/hadrian.cabal @@ -135,7 +135,7 @@ executable hadrian , BangPatterns other-extensions: MultiParamTypeClasses , TypeFamilies - build-depends: Cabal >= 3.2 && < 3.5 + build-depends: Cabal >= 3.2 && < 3.7 , QuickCheck >= 2.6 && < 2.15 , base >= 4.8 && < 5 , bytestring >= 0.10 && < 0.12 diff --git a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs index 099d5dc96f..d6dc842d1b 100644 --- a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs +++ b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs @@ -38,6 +38,9 @@ import qualified Distribution.Simple.PackageIndex as C import qualified Distribution.Text as C import qualified Distribution.Types.LocalBuildInfo as C import qualified Distribution.Types.MungedPackageId as C +#if MIN_VERSION_Cabal(3,5,0) +import qualified Distribution.Utils.Path as C +#endif import qualified Distribution.Utils.ShortText as C #if !MIN_VERSION_Cabal(3,4,0) import qualified Distribution.Types.CondTree as C @@ -273,7 +276,11 @@ resolveContextData context@Context {..} = do , mainIs = fmap (first C.display) mainIs , modules = map C.display modules , otherModules = map C.display $ C.otherModules buildInfo - , srcDirs = C.hsSourceDirs buildInfo + , srcDirs = +#if MIN_VERSION_Cabal(3,5,0) + map C.getSymbolicPath +#endif + (C.hsSourceDirs buildInfo) , depIds = depIds , depNames = map (C.display . C.mungedName . snd) extDeps , includeDirs = C.includeDirs buildInfo |