summaryrefslogtreecommitdiff
path: root/utils/ghc-cabal/Main.hs
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2013-08-26 22:03:25 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2013-08-26 23:18:07 +0200
commit795fe083e59fa22055cca53fadc36ebd26b0d2a5 (patch)
tree35c7e51458133455d779535ecbcfd1b5763c5de2 /utils/ghc-cabal/Main.hs
parent4b5238a47be6f4778c5c6edbd46b3ee3bc9d3251 (diff)
downloadhaskell-795fe083e59fa22055cca53fadc36ebd26b0d2a5.tar.gz
Sync Cabal to upstream version 1.18 pre-release
Apart from bumping build-dep version bounds, `ghc-cabal` is adapted to some minor Cabal API changes, and `bin-package-db` is made aware of Cabal's recently added AGPL licence support.
Diffstat (limited to 'utils/ghc-cabal/Main.hs')
-rw-r--r--utils/ghc-cabal/Main.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index 9a76d6b93d..7d1d9bcc92 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -167,7 +167,7 @@ doCopy directory distDir
(installDirTemplates lbi)
progs = withPrograms lbi
stripProgram' = stripProgram {
- programFindLocation = \_ -> return (Just strip) }
+ programFindLocation = \_ _ -> return (Just strip) }
progs' <- configureProgram verbosity stripProgram' progs
let lbi' = lbi {
@@ -205,12 +205,13 @@ doRegister directory distDir ghc ghcpkg topdir
progs = withPrograms lbi
ghcpkgconf = topdir </> "package.conf.d"
ghcProgram' = ghcProgram {
- programPostConf = \_ _ -> return ["-B" ++ topdir],
- programFindLocation = \_ -> return (Just ghc) }
+ programPostConf = \_ cp -> return cp { programDefaultArgs = ["-B" ++ topdir] },
+ programFindLocation = \_ _ -> return (Just ghc) }
ghcPkgProgram' = ghcPkgProgram {
- programPostConf = \_ _ -> return $ ["--global-package-db", ghcpkgconf]
- ++ ["--force" | not (null myDestDir) ],
- programFindLocation = \_ -> return (Just ghcpkg) }
+ programPostConf = \_ cp -> return cp { programDefaultArgs =
+ ["--global-package-db", ghcpkgconf]
+ ++ ["--force" | not (null myDestDir) ] },
+ programFindLocation = \_ _ -> return (Just ghcpkg) }
configurePrograms ps conf = foldM (flip (configureProgram verbosity)) conf ps
progs' <- configurePrograms [ghcProgram', ghcPkgProgram'] progs