Commit c978dd07 authored by ijones's avatar ijones
Browse files

toward -Wall cleanliness Install, Register

parent 9a73bb19
......@@ -64,7 +64,6 @@ import Distribution.Simple.Utils(setupMessage, moveSources,
import Distribution.Setup (CompilerFlavor(..), Compiler(..))
import Control.Monad(when)
import System.Cmd(system)
#ifdef DEBUG
import HUnit (Test)
......@@ -100,8 +99,8 @@ installExeGhc pref buildPref pkg_descr
installLibGHC :: FilePath -- ^install location
-> FilePath -- ^Build location
-> PackageDescription -> IO ()
installLibGHC pref buildPref pkg_descr@PackageDescription{library=Just l,
package=p}
installLibGHC pref buildPref PackageDescription{library=Just l,
package=p}
= do moveSources (pathJoin [buildPref, hsSourceDir l]) pref (modules l) ["hi"]
copyFile (mkLibName buildPref (showPackageId p))
(mkLibName pref (showPackageId p))
......@@ -110,7 +109,7 @@ installLibGHC pref buildPref pkg_descr@PackageDescription{library=Just l,
installHugs :: FilePath -- ^Install location
-> FilePath -- ^Build location
-> PackageDescription -> IO ()
installHugs pref buildPref pkg_descr@PackageDescription{library=Just l}
installHugs pref buildPref PackageDescription{library=Just l}
= moveSources (pathJoin [buildPref, hsSourceDir l]) pref (modules l) ["lhs", "hs"]
-- -----------------------------------------------------------------------------
......@@ -126,7 +125,7 @@ mkLibDir pkg_descr lbi install_prefixM =
]
mkBinDir :: PackageDescription -> LocalBuildInfo -> Maybe FilePath -> FilePath
mkBinDir pkg_descr lbi install_prefixM =
mkBinDir _ lbi install_prefixM =
pathJoin [(maybe (prefix lbi) id install_prefixM), "bin"]
-- ------------------------------------------------------------
......
......@@ -60,7 +60,6 @@ import Distribution.Simple.Utils (setupMessage, rawSystemExit, die)
import Distribution.Simple.GHCPackageConfig (mkGHCPackageConfig, showGHCPackageConfig)
import qualified Distribution.Simple.GHCPackageConfig as GHC (localPackageConfig)
import System(getEnv)
import System.Directory(doesFileExist)
import Control.Monad (when, unless)
......@@ -80,8 +79,7 @@ register pkg_descr lbi userInst = do
setupMessage "Registering" pkg_descr
case compilerFlavor (compiler lbi) of
GHC -> do let pkg_config = mkGHCPackageConfig pkg_descr lbi
(localConf, pkgConfExists) <- GHC.localPackageConfig
GHC -> do (localConf, pkgConfExists) <- GHC.localPackageConfig
unless pkgConfExists $ writeFile localConf "[]\n"
instConfExists <- doesFileExist installedPkgConfigFile
unless instConfExists (writeInstalledConfig pkg_descr lbi)
......
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