[commit: hadrian] master: Fix redundant import, minor revision (1ee62bf)

git at git.haskell.org git at git.haskell.org
Fri Jun 8 00:02:20 UTC 2018


Repository : ssh://git@git.haskell.org/hadrian

On branch  : master
Link       : http://git.haskell.org/hadrian.git/commitdiff/1ee62bf5ed6aa82cf57b8a5a8160e30d66f4a170

>---------------------------------------------------------------

commit 1ee62bf5ed6aa82cf57b8a5a8160e30d66f4a170
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Fri May 11 22:33:17 2018 +0200

    Fix redundant import, minor revision


>---------------------------------------------------------------

1ee62bf5ed6aa82cf57b8a5a8160e30d66f4a170
 src/Settings/Builders/Common.hs | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/src/Settings/Builders/Common.hs b/src/Settings/Builders/Common.hs
index 3b8a413..1995c66 100644
--- a/src/Settings/Builders/Common.hs
+++ b/src/Settings/Builders/Common.hs
@@ -11,8 +11,7 @@ module Settings.Builders.Common (
 
 import Base
 import Expression
-import GHC.Packages
-import Hadrian.Haskell.Cabal.PackageData as PD
+import Hadrian.Haskell.Cabal.PackageData
 import Oracles.Flag
 import Oracles.Setting
 import Settings
@@ -23,22 +22,21 @@ cIncludeArgs = do
     pkg     <- getPackage
     root    <- getBuildRoot
     path    <- getBuildPath
-    incDirs <- getPackageData PD.includeDirs
-    depDirs <- getPackageData PD.depIncludeDirs
+    incDirs <- getPackageData includeDirs
+    depDirs <- getPackageData depIncludeDirs
     iconvIncludeDir <- getSetting IconvIncludeDir
     gmpIncludeDir   <- getSetting GmpIncludeDir
     ffiIncludeDir   <- getSetting FfiIncludeDir
-
     mconcat [ arg "-Iincludes"
             , arg $ "-I" ++ root -/- generatedDir
             , arg $ "-I" ++ path
             , pure . map ("-I"++) . filter (/= "") $ [iconvIncludeDir, gmpIncludeDir]
             , flag UseSystemFfi ? arg ("-I" ++ ffiIncludeDir)
-            -- add the build path with include dirs in case we generated
-            -- some files with autoconf, which will end up in the build directory.
+            -- Add @incDirs@ in the build directory, since some files generated
+            -- with @autoconf@ may end up in the build directory.
             , pure [ "-I" ++ path        -/- dir | dir <- incDirs ]
-            -- add the package directory with include dirs, for includes
-            -- shipped with the package
+            -- Add @incDirs@ in the package directory for include files shipped
+            -- with the package.
             , pure [ "-I" ++ pkgPath pkg -/- dir | dir <- incDirs ]
             , pure [ "-I" ++       unifyPath dir | dir <- depDirs ] ]
 
@@ -58,12 +56,12 @@ cWarnings = mconcat
 
 packageDatabaseArgs :: Args
 packageDatabaseArgs = do
-  stage <- getStage
-  dbPath <- expr (packageDbPath stage)
-  expr (need [dbPath -/- packageDbStamp])
-  root <- getBuildRoot
-  prefix <- ifM (builder Ghc) (return "-package-db ") (return "--package-db=")
-  arg $ prefix ++ root -/- relativePackageDbPath stage
+    stage <- getStage
+    dbPath <- expr (packageDbPath stage)
+    expr (need [dbPath -/- packageDbStamp])
+    root <- getBuildRoot
+    prefix <- ifM (builder Ghc) (return "-package-db ") (return "--package-db=")
+    arg $ prefix ++ root -/- relativePackageDbPath stage
 
 bootPackageDatabaseArgs :: Args
 bootPackageDatabaseArgs = do



More information about the ghc-commits mailing list