summaryrefslogtreecommitdiff
path: root/utils/ghc-cabal
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2018-01-21 20:37:17 +0200
committerBen Gamari <ben@smart-cactus.org>2018-01-21 20:39:02 -0500
commit2671cccde749ed64129097358f81bff43480cdb9 (patch)
treeaec56bdf80e6bbf82f60f1208d3050bf8d0d36a3 /utils/ghc-cabal
parent6c0db98bc5d1dceb8fa48544532f85d386900e4a (diff)
downloadhaskell-2671cccde749ed64129097358f81bff43480cdb9.tar.gz
Update Cabal submodule
- Cabal-2.2 uses SPDX license identifiers, so I had to update `cabal-version: 2.1` packages `license: BSD3` to `license: BSD-3-Clause` - `ghc-cabal` used old ReadP parsec, now it uses `parsec` too - InstalledPackageInfo pretty-printing have changed a little, fields with default values aren't printed. This can be changed in `Cabal` still, but I haven't found problems with omitting them. Note: `BSD-3-Clause` is parsed as "name = BSD, version = 3" by old parser (because 3-Clause looks like version 3 with tag Clause). If you see *"BSD-3" is not a valid license*, then something is using old parser still. Fixes #9885.
Diffstat (limited to 'utils/ghc-cabal')
-rw-r--r--utils/ghc-cabal/Main.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index f330ce06c3..3faf998ee7 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -6,7 +6,7 @@ import qualified Distribution.ModuleName as ModuleName
import Distribution.PackageDescription
import Distribution.PackageDescription.Check hiding (doesFileExist)
import Distribution.PackageDescription.Configuration
-import Distribution.PackageDescription.Parse
+import Distribution.PackageDescription.Parsec
import Distribution.Package
import Distribution.Simple
import Distribution.Simple.Configure
@@ -93,7 +93,7 @@ runDefaultMain :: IO ()
runDefaultMain
= do let verbosity = normal
gpdFile <- defaultPackageDesc verbosity
- gpd <- readPackageDescription verbosity gpdFile
+ gpd <- readGenericPackageDescription verbosity gpdFile
case buildType (flattenPackageDescription gpd) of
Configure -> defaultMainWithHooks autoconfUserHooks
-- time has a "Custom" Setup.hs, but it's actually Configure
@@ -118,7 +118,7 @@ doCheck directory
= withCurrentDirectory directory
$ do let verbosity = normal
gpdFile <- defaultPackageDesc verbosity
- gpd <- readPackageDescription verbosity gpdFile
+ gpd <- readGenericPackageDescription verbosity gpdFile
case filter isFailure $ checkPackage gpd Nothing of
[] -> return ()
errs -> mapM_ print errs >> exitWith (ExitFailure 1)