From: simonmar Date: Thu, 20 Jan 2005 16:15:02 +0000 (+0000) Subject: [project @ 2005-01-20 16:15:02 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1213 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f6072cc4e89e50de957607e82bea904659014548;p=ghc-hetmet.git [project @ 2005-01-20 16:15:02 by simonmar] ghc-pkg list: show hidden packages in parentheses --- diff --git a/ghc/utils/ghc-pkg/Main.hs b/ghc/utils/ghc-pkg/Main.hs index 477028c..a3aa329 100644 --- a/ghc/utils/ghc-pkg/Main.hs +++ b/ghc/utils/ghc-pkg/Main.hs @@ -387,8 +387,10 @@ listPackages db_confs = do text (db_name ++ ":") $$ nest 4 packages ) where packages = fsep (punctuate comma (map pp_pkg pkg_confs)) - pp_pkg = text . showPackageId . package - + pp_pkg p + | exposed p = doc + | otherwise = parens doc + where doc = text (showPackageId (package p)) -- ----------------------------------------------------------------------------- -- Describe