Permalink
Browse files

Distribution.Gentoo.GHC: silence 'oldGhcPkgs'

Moved all the code spamming to console out from 'oldGhcPkgs'
to main module.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
trofi committed Jul 1, 2012
1 parent 6d67668 commit f9f1eed21e743c889aefbff3923e339eca61fb28
Showing with 6 additions and 5 deletions.
  1. +1 −4 Distribution/Gentoo/GHC.hs
  2. +5 −1 Main.hs
@@ -167,16 +167,13 @@ checkPkgs msg typ (pns,cnfs)
-- Finding packages installed with other versions of GHC
oldGhcPkgs :: IO [Package]
-oldGhcPkgs = do putStrLn "Searching for packages installed with a \
- \different version of GHC."
- thisGhc <- ghcLibDir
+oldGhcPkgs = do thisGhc <- ghcLibDir
let thisGhc' = BS.pack thisGhc
-- It would be nice to do this, but we can't assume
-- some crazy user hasn't deleted one of these dirs
-- libFronts' <- filterM doesDirectoryExist libFronts
pkgs <- liftM notGHC
$ concatMapM (checkLibDir thisGhc') libFronts
- pkgListPrint "old" pkgs
return pkgs
-- Find packages installed by other versions of GHC in this possible
View
@@ -79,7 +79,11 @@ data BuildTarget = GhcUpgrade
deriving (Eq, Ord, Show, Read)
getPackages :: BuildTarget -> IO [Package]
-getPackages GhcUpgrade = oldGhcPkgs
+getPackages GhcUpgrade =
+ do putStrLn "Searching for packages installed with a different version of GHC."
+ pkgs <- oldGhcPkgs
+ pkgListPrint "old" pkgs
+ return pkgs
getPackages DepCheck = brokenPkgs
getPackages AllInstalled =
do putStrLn "Finding all libraries installed with the current version of GHC."

0 comments on commit f9f1eed

Please sign in to comment.