Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal On branch : master
http://hackage.haskell.org/trac/ghc/changeset/b9b0f38dec0e4960e09ab16cb9f4ed9db59ef649 >--------------------------------------------------------------- commit b9b0f38dec0e4960e09ab16cb9f4ed9db59ef649 Author: Duncan Coutts <[email protected]> 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 _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
