summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2019-12-13 07:44:35 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-01-04 15:56:22 -0500
commitae6b62765b12b44163612488a94a9ac270b4dcc5 (patch)
tree75ce34c316b9e4056e1f9dc84fad8d34786cf215
parentd561c8f6244f8280a2483e8753c38e39d34c1f01 (diff)
downloadhaskell-ae6b62765b12b44163612488a94a9ac270b4dcc5.tar.gz
Update to Cabal submodule to v3.2.0.0-alpha3
Metric Increase: haddock.Cabal
m---------libraries/Cabal0
-rw-r--r--testsuite/tests/driver/T4437.hs12
-rw-r--r--utils/check-api-annotations/check-api-annotations.cabal2
-rw-r--r--utils/check-ppr/check-ppr.cabal2
-rw-r--r--utils/ghc-cabal/Main.hs9
-rw-r--r--utils/ghc-cabal/ghc-cabal.cabal2
-rw-r--r--utils/ghc-cabal/ghc.mk4
-rw-r--r--utils/ghc-pkg/Main.hs7
8 files changed, 19 insertions, 19 deletions
diff --git a/libraries/Cabal b/libraries/Cabal
-Subproject 63331c95ed15cc7e3d83850d308dc3a86a8c3c7
+Subproject b9253565ccf2fe4ad0124ca5a97a595edc1fbff
diff --git a/testsuite/tests/driver/T4437.hs b/testsuite/tests/driver/T4437.hs
index fd70fccad3..8bbfcb5670 100644
--- a/testsuite/tests/driver/T4437.hs
+++ b/testsuite/tests/driver/T4437.hs
@@ -36,13 +36,11 @@ check title expected got
-- See Note [Adding a language extension] in compiler/main/DynFlags.hs.
expectedGhcOnlyExtensions :: [String]
-expectedGhcOnlyExtensions = ["RelaxedLayout",
- "AlternativeLayoutRule",
- "AlternativeLayoutRuleTransitional",
- "UnliftedNewtypes",
- "CUSKs",
- "StandaloneKindSignatures",
- "ImportQualifiedPost"]
+expectedGhcOnlyExtensions =
+ [ "RelaxedLayout"
+ , "AlternativeLayoutRule"
+ , "AlternativeLayoutRuleTransitional"
+ ]
expectedCabalOnlyExtensions :: [String]
expectedCabalOnlyExtensions = ["Generics",
diff --git a/utils/check-api-annotations/check-api-annotations.cabal b/utils/check-api-annotations/check-api-annotations.cabal
index b02ad9284d..f8363de536 100644
--- a/utils/check-api-annotations/check-api-annotations.cabal
+++ b/utils/check-api-annotations/check-api-annotations.cabal
@@ -24,6 +24,6 @@ Executable check-api-annotations
Build-Depends: base >= 4 && < 5,
containers,
- Cabal >= 3.0 && < 3.2,
+ Cabal >= 3.0 && < 3.4,
directory,
ghc
diff --git a/utils/check-ppr/check-ppr.cabal b/utils/check-ppr/check-ppr.cabal
index 3636b73ed6..5938667354 100644
--- a/utils/check-ppr/check-ppr.cabal
+++ b/utils/check-ppr/check-ppr.cabal
@@ -25,7 +25,7 @@ Executable check-ppr
Build-Depends: base >= 4 && < 5,
bytestring,
containers,
- Cabal >= 3.0 && < 3.2,
+ Cabal >= 3.0 && < 3.4,
directory,
filepath,
ghc
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index 0962f9ccde..b83ad63aba 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -26,6 +26,7 @@ import Distribution.Types.LocalBuildInfo
import Distribution.Verbosity
import qualified Distribution.InstalledPackageInfo as Installed
import qualified Distribution.Simple.PackageIndex as PackageIndex
+import Distribution.Utils.ShortText (fromShortText)
import Control.Exception (bracket)
import Control.Monad
@@ -430,7 +431,7 @@ generate directory distdir config_args
variablePrefix ++ "_COMPONENT_ID = " ++ localCompatPackageKey lbi,
variablePrefix ++ "_MODULES = " ++ unwords mods,
variablePrefix ++ "_HIDDEN_MODULES = " ++ unwords otherMods,
- variablePrefix ++ "_SYNOPSIS =" ++ (unwords $ lines $ synopsis pd),
+ variablePrefix ++ "_SYNOPSIS =" ++ (unwords $ lines $ fromShortText $ synopsis pd),
variablePrefix ++ "_HS_SRC_DIRS = " ++ unwords (hsSourceDirs bi),
variablePrefix ++ "_DEPS = " ++ unwords deps,
variablePrefix ++ "_DEP_IPIDS = " ++ unwords dep_ipids,
@@ -474,9 +475,9 @@ generate directory distdir config_args
]
writeFile (distdir ++ "/package-data.mk") $ unlines xs
- writeFileUtf8 (distdir ++ "/haddock-prologue.txt") $
- if null (description pd) then synopsis pd
- else description pd
+ writeFileUtf8 (distdir ++ "/haddock-prologue.txt") $ fromShortText $
+ if null (fromShortText $ description pd) then synopsis pd
+ else description pd
where
escape = foldr (\c xs -> if c == '#' then '\\':'#':xs else c:xs) []
wrap = mapM wrap1
diff --git a/utils/ghc-cabal/ghc-cabal.cabal b/utils/ghc-cabal/ghc-cabal.cabal
index f4fefb5ab2..49ae948c44 100644
--- a/utils/ghc-cabal/ghc-cabal.cabal
+++ b/utils/ghc-cabal/ghc-cabal.cabal
@@ -21,6 +21,6 @@ Executable ghc-cabal
Build-Depends: base >= 3 && < 5,
bytestring >= 0.10 && < 0.11,
- Cabal >= 3.0 && < 3.2,
+ Cabal >= 3.0 && < 3.4,
directory >= 1.1 && < 1.4,
filepath >= 1.2 && < 1.5
diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk
index c921f329cb..90a47ddf98 100644
--- a/utils/ghc-cabal/ghc.mk
+++ b/utils/ghc-cabal/ghc.mk
@@ -23,9 +23,9 @@ CABAL_CONSTRAINT := --constraint="Cabal == $(CABAL_DOTTED_VERSION)"
# macros is triggered by `-hide-all-packages`, so we have to explicitly
# enumerate all packages we need in scope.
ifeq "$(Windows_Host)" "YES"
-CABAL_BUILD_DEPS := ghc-prim base array transformers time containers bytestring deepseq process pretty directory Win32
+CABAL_BUILD_DEPS := ghc-prim base array transformers time containers bytestring deepseq process pretty directory filepath Win32
else
-CABAL_BUILD_DEPS := ghc-prim base array transformers time containers bytestring deepseq process pretty directory unix
+CABAL_BUILD_DEPS := ghc-prim base array transformers time containers bytestring deepseq process pretty directory filepath unix
endif
ghc-cabal_DIST_BINARY_NAME = ghc-cabal$(exeext0)
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index 13a85cbaef..c29e4cfd13 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -83,6 +83,7 @@ import qualified Data.Foldable as F
import qualified Data.Traversable as F
import qualified Data.Set as Set
import qualified Data.Map as Map
+import qualified Data.ByteString as BS
#if defined(mingw32_HOST_OS)
import GHC.ConsoleHandler
@@ -948,7 +949,7 @@ readParseDatabase verbosity mb_user_conf mode use_cache path
parseSingletonPackageConf :: Verbosity -> FilePath -> IO InstalledPackageInfo
parseSingletonPackageConf verbosity file = do
when (verbosity > Normal) $ infoLn ("reading package config: " ++ file)
- readUTF8File file >>= fmap fst . parsePackageInfo
+ BS.readFile file >>= fmap fst . parsePackageInfo
cachefilename :: FilePath
cachefilename = "package.cache"
@@ -1143,7 +1144,7 @@ registerPackage input verbosity my_flags multi_instance
expanded <- if expand_env_vars then expandEnvVars s force
else return s
- (pkg, ws) <- parsePackageInfo expanded
+ (pkg, ws) <- parsePackageInfo $ toUTF8BS expanded
when (verbosity >= Normal) $
infoLn "done."
@@ -1177,7 +1178,7 @@ registerPackage input verbosity my_flags multi_instance
changeDB verbosity (removes ++ [AddPackage pkg]) db_to_operate_on db_stack
parsePackageInfo
- :: String
+ :: BS.ByteString
-> IO (InstalledPackageInfo, [ValidateWarning])
parsePackageInfo str =
case parseInstalledPackageInfo str of