Commit d6a1c9fc authored by Malcolm.Wallace's avatar Malcolm.Wallace
Browse files

help nhc98 to disambiguate imports

parent f4aa1330
......@@ -63,7 +63,7 @@ import qualified Distribution.InstalledPackageInfo as InstalledPackageInfo
( InstalledPackageInfo_(package) )
import qualified Distribution.Simple.InstalledPackageIndex as InstalledPackageIndex
import Distribution.Simple.InstalledPackageIndex (InstalledPackageIndex)
import Distribution.PackageDescription
import Distribution.PackageDescription as PD
( PackageDescription(..), GenericPackageDescription(..)
, Library(..), hasLibs, Executable(..), BuildInfo(..)
, HookedBuildInfo, updatePackageDescription
......@@ -475,11 +475,11 @@ ccLdOptionsBuildInfo cflags ldflags =
(extraLibs', ldflags') = partition ("-l" `isPrefixOf`) ldflags
(extraLibDirs', ldflags'') = partition ("-L" `isPrefixOf`) ldflags'
in emptyBuildInfo {
includeDirs = map (drop 2) includeDirs',
extraLibs = map (drop 2) extraLibs',
extraLibDirs = map (drop 2) extraLibDirs',
ccOptions = cflags',
ldOptions = ldflags''
PD.includeDirs = map (drop 2) includeDirs',
PD.extraLibs = map (drop 2) extraLibs',
PD.extraLibDirs = map (drop 2) extraLibDirs',
PD.ccOptions = cflags',
PD.ldOptions = ldflags''
}
-- -----------------------------------------------------------------------------
......
......@@ -44,7 +44,7 @@ module Distribution.Simple.JHC (
configure, getInstalledPackages, build, installLib, installExe
) where
import Distribution.PackageDescription
import Distribution.PackageDescription as PD
( PackageDescription(..), BuildInfo(..),
withLib,
Executable(..), withExe, Library(..),
......@@ -156,7 +156,7 @@ constructJHCCmdLine lbi bi _odir verbosity =
++ ["--noauto","-i-"]
++ ["-i", autogenModulesDir lbi]
++ concat [["-i", l] | l <- nub (hsSourceDirs bi)]
++ ["-optc" ++ opt | opt <- ccOptions bi]
++ ["-optc" ++ opt | opt <- PD.ccOptions bi]
++ (concat [ ["-p", showPackageId pkg] | pkg <- packageDeps lbi ])
jhcPkgConf :: PackageDescription -> String
......@@ -165,7 +165,7 @@ jhcPkgConf pd =
Just lib = library pd
comma = intercalate ","
in unlines [sline "name" (showPackageId . package)
,"exposed-modules: " ++ (comma (exposedModules lib))
,"exposed-modules: " ++ (comma (PD.exposedModules lib))
,"hidden-modules: " ++ (comma (otherModules $ libBuildInfo lib))
]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment