[commit: Cabal] master: Use commandDefaultFlags = mempty rather than commandAddActionWithEmptyFlags (8cf4603)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:49:24 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/8cf4603db14f7f22a37615ae0dc6e924fefbbc05
>---------------------------------------------------------------
commit 8cf4603db14f7f22a37615ae0dc6e924fefbbc05
Author: Duncan Coutts <duncan at haskell.org>
Date: Tue Jan 15 15:07:25 2008 +0000
Use commandDefaultFlags = mempty rather than commandAddActionWithEmptyFlags
Simpler and simplifies the Command api in the Cabal lib
>---------------------------------------------------------------
cabal-install/Hackage/Setup.hs | 10 ++++++----
cabal-install/Main.hs | 4 ++--
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/cabal-install/Hackage/Setup.hs b/cabal-install/Hackage/Setup.hs
index 4f3e444..a88f483 100644
--- a/cabal-install/Hackage/Setup.hs
+++ b/cabal-install/Hackage/Setup.hs
@@ -63,9 +63,10 @@ globalCommand = Cabal.globalCommand {
installCommand :: CommandUI Cabal.ConfigFlags
installCommand = (Cabal.configureCommand defaultProgramConfiguration) {
- commandName = "install",
- commandSynopsis = "Installs a list of packages.",
- commandUsage = usagePackages "install"
+ commandName = "install",
+ commandSynopsis = "Installs a list of packages.",
+ commandUsage = usagePackages "install",
+ commandDefaultFlags = mempty
}
fetchCommand :: CommandUI (Flag Verbosity)
@@ -103,7 +104,8 @@ upgradeCommand = (Cabal.configureCommand defaultProgramConfiguration) {
commandName = "upgrade",
commandSynopsis = "Upgrades installed packages to the latest available version",
commandDescription = Nothing,
- commandUsage = usagePackages "upgrade"
+ commandUsage = usagePackages "upgrade",
+ commandDefaultFlags = mempty
}
{-
diff --git a/cabal-install/Main.hs b/cabal-install/Main.hs
index bf83a42..504b26d 100644
--- a/cabal-install/Main.hs
+++ b/cabal-install/Main.hs
@@ -78,11 +78,11 @@ mainWorker args =
++ " of the Cabal library "
commands =
- [installCommand `commandAddActionWithEmptyFlags` installAction
+ [installCommand `commandAddAction` installAction
,infoCommand `commandAddAction` infoAction
,listCommand `commandAddAction` listAction
,updateCommand `commandAddAction` updateAction
- ,upgradeCommand `commandAddActionWithEmptyFlags` upgradeAction
+ ,upgradeCommand `commandAddAction` upgradeAction
,fetchCommand `commandAddAction` fetchAction
,uploadCommand `commandAddAction` uploadAction
More information about the Cvs-libraries
mailing list