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 ...@@ -63,7 +63,7 @@ import qualified Distribution.InstalledPackageInfo as InstalledPackageInfo
( InstalledPackageInfo_(package) ) ( InstalledPackageInfo_(package) )
import qualified Distribution.Simple.InstalledPackageIndex as InstalledPackageIndex import qualified Distribution.Simple.InstalledPackageIndex as InstalledPackageIndex
import Distribution.Simple.InstalledPackageIndex (InstalledPackageIndex) import Distribution.Simple.InstalledPackageIndex (InstalledPackageIndex)
import Distribution.PackageDescription import Distribution.PackageDescription as PD
( PackageDescription(..), GenericPackageDescription(..) ( PackageDescription(..), GenericPackageDescription(..)
, Library(..), hasLibs, Executable(..), BuildInfo(..) , Library(..), hasLibs, Executable(..), BuildInfo(..)
, HookedBuildInfo, updatePackageDescription , HookedBuildInfo, updatePackageDescription
...@@ -475,11 +475,11 @@ ccLdOptionsBuildInfo cflags ldflags = ...@@ -475,11 +475,11 @@ ccLdOptionsBuildInfo cflags ldflags =
(extraLibs', ldflags') = partition ("-l" `isPrefixOf`) ldflags (extraLibs', ldflags') = partition ("-l" `isPrefixOf`) ldflags
(extraLibDirs', ldflags'') = partition ("-L" `isPrefixOf`) ldflags' (extraLibDirs', ldflags'') = partition ("-L" `isPrefixOf`) ldflags'
in emptyBuildInfo { in emptyBuildInfo {
includeDirs = map (drop 2) includeDirs', PD.includeDirs = map (drop 2) includeDirs',
extraLibs = map (drop 2) extraLibs', PD.extraLibs = map (drop 2) extraLibs',
extraLibDirs = map (drop 2) extraLibDirs', PD.extraLibDirs = map (drop 2) extraLibDirs',
ccOptions = cflags', PD.ccOptions = cflags',
ldOptions = ldflags'' PD.ldOptions = ldflags''
} }
-- ----------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
......
...@@ -44,7 +44,7 @@ module Distribution.Simple.JHC ( ...@@ -44,7 +44,7 @@ module Distribution.Simple.JHC (
configure, getInstalledPackages, build, installLib, installExe configure, getInstalledPackages, build, installLib, installExe
) where ) where
import Distribution.PackageDescription import Distribution.PackageDescription as PD
( PackageDescription(..), BuildInfo(..), ( PackageDescription(..), BuildInfo(..),
withLib, withLib,
Executable(..), withExe, Library(..), Executable(..), withExe, Library(..),
...@@ -156,7 +156,7 @@ constructJHCCmdLine lbi bi _odir verbosity = ...@@ -156,7 +156,7 @@ constructJHCCmdLine lbi bi _odir verbosity =
++ ["--noauto","-i-"] ++ ["--noauto","-i-"]
++ ["-i", autogenModulesDir lbi] ++ ["-i", autogenModulesDir lbi]
++ concat [["-i", l] | l <- nub (hsSourceDirs bi)] ++ 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 ]) ++ (concat [ ["-p", showPackageId pkg] | pkg <- packageDeps lbi ])
jhcPkgConf :: PackageDescription -> String jhcPkgConf :: PackageDescription -> String
...@@ -165,7 +165,7 @@ jhcPkgConf pd = ...@@ -165,7 +165,7 @@ jhcPkgConf pd =
Just lib = library pd Just lib = library pd
comma = intercalate "," comma = intercalate ","
in unlines [sline "name" (showPackageId . package) in unlines [sline "name" (showPackageId . package)
,"exposed-modules: " ++ (comma (exposedModules lib)) ,"exposed-modules: " ++ (comma (PD.exposedModules lib))
,"hidden-modules: " ++ (comma (otherModules $ libBuildInfo 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