Commit fc7a5ca9 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

installCommand only ever needs to use defaultProgramConfiguration

So don't bother making it a parameter
parent 4d67cdd3
......@@ -22,7 +22,7 @@ module Hackage.Setup
, updateConfig
) where
import Distribution.Simple.Program (ProgramConfiguration)
import Distribution.Simple.Program (defaultProgramConfiguration)
import Distribution.Simple.Compiler (PackageDB(..))
import Distribution.Simple.InstallDirs (combineInstallDirs)
import Distribution.Simple.Command
......@@ -87,11 +87,11 @@ globalCommand = Cabal.globalCommand {
++ "\nSee http://www.haskell.org/cabal/ for more information.\n"
}
installCommand :: ProgramConfiguration -> CommandUI Cabal.ConfigFlags
installCommand progConf = (Cabal.configureCommand progConf) {
installCommand :: CommandUI Cabal.ConfigFlags
installCommand = (Cabal.configureCommand defaultProgramConfiguration) {
commandName = "install",
commandSynopsis = "Installs a list of packages.",
commandUsage = usagePackages "install"
commandUsage = usagePackages "install"
}
fetchCommand :: CommandUI ()
......
......@@ -17,7 +17,6 @@ import Hackage.Setup
import Distribution.PackageDescription (cabalVersion)
import qualified Distribution.Simple.Setup as Cabal
import Distribution.Simple.Setup (fromFlag)
import Distribution.Simple.Program
import Distribution.Simple.Command
import Distribution.Simple.UserHooks (Args)
import Hackage.Config (defaultConfigFile, loadConfig, findCompiler)
......@@ -65,9 +64,8 @@ mainWorker args =
++ showVersion cabalVersion
++ " of the Cabal library "
progs = defaultProgramConfiguration
commands =
[installCommand progs `commandAddActionWithEmptyFlags` installAction
[installCommand `commandAddActionWithEmptyFlags` installAction
,infoCommand `commandAddAction` infoAction
,listCommand `commandAddAction` listAction
,updateCommand `commandAddAction` updateAction
......
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