[commit: ghc] wip/ggreif-new-cabal: Some raw fixed to compile with TOT Cabal (8640b7e)
git at git.haskell.org
git at git.haskell.org
Fri Aug 5 16:20:38 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/ggreif-new-cabal
Link : http://ghc.haskell.org/trac/ghc/changeset/8640b7e8042b006845f9871f12df0dc42a502526/ghc
>---------------------------------------------------------------
commit 8640b7e8042b006845f9871f12df0dc42a502526
Author: Gabor Greif <ggreif at gmail.com>
Date: Fri Aug 5 18:16:20 2016 +0200
Some raw fixed to compile with TOT Cabal
>---------------------------------------------------------------
8640b7e8042b006845f9871f12df0dc42a502526
libraries/Cabal | 2 +-
utils/ghc-cabal/Main.hs | 6 +++---
utils/ghc-pkg/Main.hs | 12 ++++++------
utils/ghctags/Main.hs | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/libraries/Cabal b/libraries/Cabal
index 40d6f0a..27b4aa8 160000
--- a/libraries/Cabal
+++ b/libraries/Cabal
@@ -1 +1 @@
-Subproject commit 40d6f0afd5b86d698abb876d4f5ed0bb452b0c4b
+Subproject commit 27b4aa80e4aa8235cd011467485badc64469fc7a
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index 8cc1d1a..2595693 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -150,12 +150,12 @@ doCopy directory distDir
noGhcPrimHook f pd lbi us flags
= let pd'
| packageName pd == PackageName "ghc-prim" =
- case libraries pd of
+ case allLibraries pd of
[lib] ->
let ghcPrim = fromJust (simpleParse "GHC.Prim")
ems = filter (ghcPrim /=) (exposedModules lib)
lib' = lib { exposedModules = ems }
- in pd { libraries = [lib'] }
+ in pd { subLibraries = [lib'], library = Nothing }
[] ->
error "Expected a library, but none found"
_ ->
@@ -326,7 +326,7 @@ generate directory distdir dll0Modules config_args
comp = compiler lbi
libBiModules lib = (libBuildInfo lib, libModules lib)
exeBiModules exe = (buildInfo exe, ModuleName.main : exeModules exe)
- biModuless = (map libBiModules $ libraries pd)
+ biModuless = (map libBiModules $ allLibraries pd)
++ (map exeBiModules $ executables pd)
buildableBiModuless = filter isBuildable biModuless
where isBuildable (bi', _) = buildable bi'
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index e0625fe..332891b 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -1079,7 +1079,7 @@ type PackageCacheFormat = GhcPkg.InstalledPackageInfo
PackageName
UnitId
ModuleName
- OriginalModule
+ Module
convertPackageInfoToCacheFormat :: InstalledPackageInfo -> PackageCacheFormat
convertPackageInfoToCacheFormat pkg =
@@ -1132,9 +1132,9 @@ instance GhcPkg.BinaryStringRep String where
fromStringRep = fromUTF8 . BS.unpack
toStringRep = BS.pack . toUTF8
-instance GhcPkg.DbModuleRep UnitId ModuleName OriginalModule where
- fromDbModule (GhcPkg.DbModule uid mod_name) = OriginalModule uid mod_name
- toDbModule (OriginalModule uid mod_name) = GhcPkg.DbModule uid mod_name
+instance GhcPkg.DbModuleRep UnitId ModuleName Module where
+ fromDbModule (GhcPkg.DbModule uid mod_name) = Module uid mod_name
+ toDbModule (Module uid mod_name) = GhcPkg.DbModule uid mod_name
-- -----------------------------------------------------------------------------
-- Exposing, Hiding, Trusting, Distrusting, Unregistering are all similar
@@ -1782,10 +1782,10 @@ checkDuplicateModules pkg
checkOriginalModule :: String
-> PackageDBStack
-> InstalledPackageInfo
- -> OriginalModule
+ -> Module
-> Validate ()
checkOriginalModule field_name db_stack pkg
- (OriginalModule definingPkgId definingModule) =
+ (Module definingPkgId definingModule) =
let mpkg = if definingPkgId == installedUnitId pkg
then Just pkg
else PackageIndex.lookupUnitId ipix definingPkgId
diff --git a/utils/ghctags/Main.hs b/utils/ghctags/Main.hs
index 9a2ab2c..1612f42 100644
--- a/utils/ghctags/Main.hs
+++ b/utils/ghctags/Main.hs
@@ -179,7 +179,7 @@ flagsFromCabal :: FilePath -> IO [String]
flagsFromCabal distPref = do
lbi <- getPersistBuildConfig distPref
let pd = localPkgDescr lbi
- case maybeGetDefaultLibraryLocalBuildInfo lbi of
+ case undefined lbi of
Just clbi ->
let CLib lib = getComponent pd (componentLocalName clbi)
bi = libBuildInfo lib
More information about the ghc-commits
mailing list