Update Cabal submodule
authorOleg Grenrus <oleg.grenrus@iki.fi>
Sun, 21 Jan 2018 18:37:17 +0000 (20:37 +0200)
committerBen Gamari <ben@smart-cactus.org>
Mon, 22 Jan 2018 01:39:02 +0000 (20:39 -0500)
- 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.

libraries/Cabal
libraries/base/base.cabal
libraries/ghc-prim/ghc-prim.cabal
testsuite/tests/backpack/cabal/bkpcabal06/bkpcabal06.cabal
testsuite/tests/cabal/ghcpkg01.stdout
utils/ghc-cabal/Main.hs

index 3f20e1f..d2cf3f1 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 3f20e1faf9bc86ecb154ccf3e8b913bff14b9264
+Subproject commit d2cf3f13dad9f1172cf9371ea197d1204e9e17a2
index 4252cdc..dc529a8 100644 (file)
@@ -3,7 +3,7 @@ name:           base
 version:        4.11.0.0
 -- NOTE: Don't forget to update ./changelog.md
 
-license:        BSD3
+license:        BSD-3-Clause
 license-file:   LICENSE
 maintainer:     libraries@haskell.org
 bug-reports:    http://ghc.haskell.org/trac/ghc/newticket?component=libraries/base
index 9b8c1ac..f395c9f 100644 (file)
@@ -2,7 +2,7 @@ cabal-version:  2.1
 name:           ghc-prim
 version:        0.5.2.0
 -- NOTE: Don't forget to update ./changelog.md
-license:        BSD3
+license:        BSD-3-Clause
 license-file:   LICENSE
 category:       GHC
 maintainer:     libraries@haskell.org
index 7dfac20..ff322a4 100644 (file)
@@ -4,7 +4,7 @@ license:             BSD3
 author:              Edward Z. Yang
 maintainer:          ezyang@cs.stanford.edu
 build-type:          Simple
-cabal-version:       >=1.10
+cabal-version:       2.0
 
 library sig
   signatures: P
index ef77814..4523e28 100644 (file)
@@ -8,23 +8,19 @@ key: testpkg-1.2.3.4-XXX
 license: BSD3
 copyright: (c) The Univsersity of Glasgow 2004
 maintainer: glasgow-haskell-users@haskell.org
+author: simonmar@microsoft.com
 stability: stable
 homepage: http://www.haskell.org/ghc
 package-url: http://www.haskell.org/ghc
 description:
     A Test Package
 category: none
-author: simonmar@microsoft.com
 exposed: True
-indefinite: False
 exposed-modules:
     A
 hidden-modules: B C.D
-abi: 
-trusted: False
 import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
 library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
-data-dir: ""
 hs-libraries: testpkg-1.2.3.4-XXX
 include-dirs: /usr/local/include/testpkg "c:/Program Files/testpkg"
 pkgroot: 
@@ -36,23 +32,19 @@ key: testpkg-1.2.3.4-XXX
 license: BSD3
 copyright: (c) The Univsersity of Glasgow 2004
 maintainer: glasgow-haskell-users@haskell.org
+author: simonmar@microsoft.com
 stability: stable
 homepage: http://www.haskell.org/ghc
 package-url: http://www.haskell.org/ghc
 description:
     A Test Package
 category: none
-author: simonmar@microsoft.com
 exposed: True
-indefinite: False
 exposed-modules:
     A
 hidden-modules: B C.D
-abi: 
-trusted: False
 import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
 library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
-data-dir: ""
 hs-libraries: testpkg-1.2.3.4-XXX
 include-dirs: /usr/local/include/testpkg "c:/Program Files/testpkg"
 pkgroot: 
@@ -70,23 +62,18 @@ key: testpkg-2.0-XXX
 license: BSD3
 copyright: (c) The Univsersity of Glasgow 2004
 maintainer: glasgow-haskell-users@haskell.org
+author: simonmar@microsoft.com
 stability: unstable
 homepage: http://www.haskell.org/ghc
 package-url: http://www.haskell.org/ghc
 description:
     A Test Package (new version)
 category: none
-author: simonmar@microsoft.com
-exposed: False
-indefinite: False
 exposed-modules:
     A
 hidden-modules: B C.D C.E
-abi: 
-trusted: False
 import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
 library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
-data-dir: ""
 hs-libraries: testpkg-2.0-XXX
 include-dirs: /usr/local/include/testpkg "c:/Program Files/testpkg"
 pkgroot: 
@@ -98,23 +85,18 @@ key: testpkg-2.0-XXX
 license: BSD3
 copyright: (c) The Univsersity of Glasgow 2004
 maintainer: glasgow-haskell-users@haskell.org
+author: simonmar@microsoft.com
 stability: unstable
 homepage: http://www.haskell.org/ghc
 package-url: http://www.haskell.org/ghc
 description:
     A Test Package (new version)
 category: none
-author: simonmar@microsoft.com
-exposed: False
-indefinite: False
 exposed-modules:
     A
 hidden-modules: B C.D C.E
-abi: 
-trusted: False
 import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
 library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
-data-dir: ""
 hs-libraries: testpkg-2.0-XXX
 include-dirs: /usr/local/include/testpkg "c:/Program Files/testpkg"
 pkgroot: 
@@ -126,23 +108,19 @@ key: testpkg-1.2.3.4-XXX
 license: BSD3
 copyright: (c) The Univsersity of Glasgow 2004
 maintainer: glasgow-haskell-users@haskell.org
+author: simonmar@microsoft.com
 stability: stable
 homepage: http://www.haskell.org/ghc
 package-url: http://www.haskell.org/ghc
 description:
     A Test Package
 category: none
-author: simonmar@microsoft.com
 exposed: True
-indefinite: False
 exposed-modules:
     A
 hidden-modules: B C.D
-abi: 
-trusted: False
 import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
 library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
-data-dir: ""
 hs-libraries: testpkg-1.2.3.4-XXX
 include-dirs: /usr/local/include/testpkg "c:/Program Files/testpkg"
 pkgroot: 
@@ -161,23 +139,18 @@ key: testpkg-1.2.3.4-XXX
 license: BSD3
 copyright: (c) The Univsersity of Glasgow 2004
 maintainer: glasgow-haskell-users@haskell.org
+author: simonmar@microsoft.com
 stability: stable
 homepage: http://www.haskell.org/ghc
 package-url: http://www.haskell.org/ghc
 description:
     A Test Package
 category: none
-author: simonmar@microsoft.com
-exposed: False
-indefinite: False
 exposed-modules:
     A
 hidden-modules: B C.D
-abi: 
-trusted: False
 import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
 library-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg"
-data-dir: ""
 hs-libraries: testpkg-1.2.3.4-XXX
 include-dirs: /usr/local/include/testpkg "c:/Program Files/testpkg"
 pkgroot: 
index f330ce0..3faf998 100644 (file)
@@ -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)