Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Distribution.Gentoo.GHC: export 'pkgListPrint' and silence 'allInstal…

…ledPackages'

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

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
commit ebad6e2ad6338a5b3d1a4fb58ab26517a0f23af7 1 parent a9ea29d
Sergei Trofimovich trofi authored

Showing 2 changed files with 7 additions and 5 deletions. Show diff stats Hide diff stats

  1. +2 4 Distribution/Gentoo/GHC.hs
  2. +5 1 Main.hs
6 Distribution/Gentoo/GHC.hs
@@ -15,6 +15,7 @@ module Distribution.Gentoo.GHC
15 15 , oldGhcPkgs
16 16 , brokenPkgs
17 17 , allInstalledPackages
  18 + , pkgListPrint
18 19 ) where
19 20
20 21 import Distribution.Gentoo.Util
@@ -242,11 +243,8 @@ getBroken = liftM (mapMaybe simpleParse . words)
242 243 -- -----------------------------------------------------------------------------
243 244
244 245 allInstalledPackages :: IO [Package]
245   -allInstalledPackages = do putStrLn "Finding all libraries installed with the \
246   - \current version of GHC."
247   - libDir <- ghcLibDir
  246 +allInstalledPackages = do libDir <- ghcLibDir
248 247 let libDir' = BS.pack libDir
249 248 pkgs <- liftM notGHC
250 249 $ pkgsHaveContent $ hasDirMatching (==libDir')
251   - pkgListPrint "installed" pkgs
252 250 return pkgs
6 Main.hs
@@ -81,7 +81,11 @@ data BuildTarget = GhcUpgrade
81 81 getPackages :: BuildTarget -> IO [Package]
82 82 getPackages GhcUpgrade = oldGhcPkgs
83 83 getPackages DepCheck = brokenPkgs
84   -getPackages AllInstalled = allInstalledPackages
  84 +getPackages AllInstalled =
  85 + do putStrLn "Finding all libraries installed with the current version of GHC."
  86 + pkgs <- allInstalledPackages
  87 + pkgListPrint "installed" pkgs
  88 + return pkgs
85 89
86 90 allGetPackages :: Set.Set BuildTarget -> IO [Package]
87 91 allGetPackages = liftM nub

0 comments on commit ebad6e2

Please sign in to comment.
Something went wrong with that request. Please try again.