[commit: Cabal] master: In cabal list, always display available and installed versions (c5eb9e0)
Ian Lynagh
igloo at earth.li
Fri Jun 24 02:01:37 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/c5eb9e0f43ea7ea1ee3ea8025933473df1065859
>---------------------------------------------------------------
commit c5eb9e0f43ea7ea1ee3ea8025933473df1065859
Author: Duncan Coutts <duncan at haskell.org>
Date: Wed Jan 14 00:33:29 2009 +0000
In cabal list, always display available and installed versions
Previously we omitted the line if it was not installed, or was
not available. However that confused people because it was not
obvious that it would list both. Now it shows something like:
* foo
Latest version available: 1.0
Latest version installed: [ Not installed ]
>---------------------------------------------------------------
cabal-install/Distribution/Client/List.hs | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/cabal-install/Distribution/Client/List.hs b/cabal-install/Distribution/Client/List.hs
index 9788960..33051f3 100644
--- a/cabal-install/Distribution/Client/List.hs
+++ b/cabal-install/Distribution/Client/List.hs
@@ -104,12 +104,14 @@ showPackageInfo pkg =
text " *" <+> disp (name pkg)
$+$
(nest 6 $ vcat [
- maybeShow (availableVersions pkg)
- "Latest version available:"
- (disp . maximum)
- , maybeShow (installedVersions pkg)
- "Latest version installed:"
- (disp . maximum)
+ text "Latest version available:" <+>
+ case availableVersions pkg of
+ [] -> text "[ Not available from server ]"
+ vs -> disp (maximum vs)
+ , text "Latest version installed:" <+>
+ case installedVersions pkg of
+ [] -> text "[ Not installed ]"
+ vs -> disp (maximum vs)
, maybeShow (homepage pkg) "Homepage:" text
, maybeShow (category pkg) "Category:" text
, maybeShow (synopsis pkg) "Synopsis:" reflowParas
More information about the Cvs-libraries
mailing list