Commit 6dde3458 authored by refold's avatar refold
Browse files

Fix warnings.

parent f2d876a1
......@@ -63,7 +63,7 @@ module Distribution.Simple.BuildPaths (
import System.FilePath ((</>), (<.>))
import Distribution.Package
( PackageIdentifier, packageName )
( packageName )
import Distribution.ModuleName (ModuleName)
import qualified Distribution.ModuleName as ModuleName
import Distribution.Compiler
......
......@@ -91,7 +91,7 @@ import Distribution.Simple.InstallDirs hiding ( absoluteInstallDirs )
import Distribution.Simple.BuildPaths
import Distribution.Simple.Utils
import Distribution.Package
( PackageIdentifier, Package(..), PackageName(..) )
( Package(..), PackageName(..) )
import qualified Distribution.ModuleName as ModuleName
import Distribution.Simple.Program
( Program(..), ConfiguredProgram(..), ProgramConfiguration, ProgArg
......@@ -1093,7 +1093,7 @@ installLib :: Verbosity
-> Library
-> ComponentLocalBuildInfo
-> IO ()
installLib verbosity lbi targetDir dynlibTargetDir builtDir pkg lib clbi = do
installLib verbosity lbi targetDir dynlibTargetDir builtDir _pkg lib clbi = do
-- copy .hi files over:
let copyHelper installFun src dst n = do
createDirectoryIfMissingVerbose verbosity True dst
......@@ -1127,8 +1127,6 @@ installLib verbosity lbi targetDir dynlibTargetDir builtDir pkg lib clbi = do
ghciLibNames = map mkGHCiLibName libNames
sharedLibNames = map (mkSharedLibName cid) libNames
pkgid = packageId pkg
hasLib = not $ null (libModules lib)
&& null (cSources (libBuildInfo lib))
ifVanilla = when (hasLib && withVanillaLib lbi)
......
......@@ -82,12 +82,12 @@ import qualified Distribution.Simple.PackageIndex as PackageIndex
import Distribution.ParseUtils ( ParseResult(..) )
import Distribution.Simple.LocalBuildInfo
( LocalBuildInfo(..), ComponentLocalBuildInfo(..),
ComponentName(..), LibraryName(..) )
LibraryName(..) )
import Distribution.Simple.InstallDirs
import Distribution.Simple.BuildPaths
import Distribution.Simple.Utils
import Distribution.Package
( PackageIdentifier, Package(..) )
( Package(..) )
import qualified Distribution.ModuleName as ModuleName
import Distribution.Simple.Program
( Program(..), ConfiguredProgram(..), ProgramConfiguration, ProgArg
......@@ -757,7 +757,7 @@ installLib :: Verbosity
-> Library
-> ComponentLocalBuildInfo
-> IO ()
installLib verbosity lbi targetDir dynlibTargetDir builtDir pkg lib clbi = do
installLib verbosity lbi targetDir dynlibTargetDir builtDir _pkg lib clbi = do
-- copy .hi files over:
let copy src dst n = do
createDirectoryIfMissingVerbose verbosity True dst
......@@ -790,8 +790,6 @@ installLib verbosity lbi targetDir dynlibTargetDir builtDir pkg lib clbi = do
ghciLibNames = map mkGHCiLibName libNames
sharedLibNames = map (mkSharedLibName cid) libNames
pkgid = packageId pkg
hasLib = not $ null (libModules lib)
&& null (cSources (libBuildInfo lib))
ifVanilla = when (hasLib && withVanillaLib lbi)
......
......@@ -52,7 +52,7 @@ module Distribution.Simple.NHC (
import Distribution.Package
( PackageName, PackageIdentifier(..), InstalledPackageId(..)
, packageId, packageName )
, packageName )
import Distribution.InstalledPackageInfo
( InstalledPackageInfo
, InstalledPackageInfo_( InstalledPackageInfo, installedPackageId
......@@ -422,13 +422,13 @@ installLib :: Verbosity -- ^verbosity
-> Library
-> ComponentLocalBuildInfo
-> IO ()
installLib verbosity pref buildPref pkgid lib clbi
installLib verbosity pref buildPref _pkgid lib clbi
= do let bi = libBuildInfo lib
modules = exposedModules lib ++ otherModules bi
findModuleFiles [buildPref] ["hi"] modules
>>= installOrdinaryFiles verbosity pref
let libNames = map mkLibName (componentLibraries clbi)
installLib libName = installOrdinaryFile verbosity
(buildPref </> libName)
(pref </> libName)
mapM_ installLib libNames
installLib' libName = installOrdinaryFile verbosity
(buildPref </> libName)
(pref </> libName)
mapM_ installLib' libNames
......@@ -294,8 +294,8 @@ generalInstalledPackageInfo adjustRelIncDirs pkg lib clbi installDirs =
IPI.libraryDirs = if hasLibrary
then libdir installDirs : extraLibDirs bi
else extraLibDirs bi,
IPI.hsLibraries = [ lib
| LibraryName lib <- componentLibraries clbi ],
IPI.hsLibraries = [ libname
| LibraryName libname <- componentLibraries clbi ],
IPI.extraLibraries = extraLibs bi,
IPI.extraGHCiLibraries = [],
IPI.includeDirs = absinc ++ adjustRelIncDirs relinc,
......
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