From f6072cc4e89e50de957607e82bea904659014548 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 20 Jan 2005 16:15:02 +0000 Subject: [PATCH] [project @ 2005-01-20 16:15:02 by simonmar] ghc-pkg list: show hidden packages in parentheses --- ghc/utils/ghc-pkg/Main.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 1.7.10.4