summaryrefslogtreecommitdiff
path: root/utils/ghc-cabal
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 /utils/ghc-cabal
parentd561c8f6244f8280a2483e8753c38e39d34c1f01 (diff)
downloadhaskell-ae6b62765b12b44163612488a94a9ac270b4dcc5.tar.gz
Update to Cabal submodule to v3.2.0.0-alpha3
Metric Increase: haddock.Cabal
Diffstat (limited to 'utils/ghc-cabal')
-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
3 files changed, 8 insertions, 7 deletions
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)