Skip to content

Commit

Permalink
Clean up message printing for blank line usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-m committed Nov 24, 2009
1 parent 18b35a5 commit f2ea498
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Distribution/Gentoo/GHC.hs
Expand Up @@ -90,10 +90,11 @@ confFiles dir = do let gDir = dir </> "gentoo"
pkgListPrint :: String -> [Package] -> IO ()
pkgListPrint desc pkgs
= if null pkgs
then putStrLn $ unwords ["No", desc, "packages found!"]
then putStrLn $ unwords ["No", desc, "packages found!\n"]
else do putStrLn $ unwords ["Found the following"
, desc, "packages:"]
printList printPkg pkgs
putStrLn ""

-- Print a bullet list of values with one value per line.
printList :: (a -> String) -> [a] -> IO ()
Expand All @@ -106,7 +107,7 @@ tryMaybe f a = maybe (Left a) Right $ f a

-- Finding packages installed with other versions of GHC
oldGhcPkgs :: IO [Package]
oldGhcPkgs = do putStrLn "\nSearching for packages installed with a \
oldGhcPkgs = do putStrLn "Searching for packages installed with a \
\different version of GHC."
thisGhc <- ghcLibDir
let thisGhc' = BS.pack thisGhc
Expand Down Expand Up @@ -159,7 +160,7 @@ libFronts = map BS.pack

-- Finding broken packages in this install of GHC.
brokenPkgs :: IO [Package]
brokenPkgs = do putStrLn "\nSearching Haskell libraries with broken dependencies."
brokenPkgs = do putStrLn "Searching for Haskell libraries with broken dependencies."
(pns, cnfs) <- brokenConfs
unless (null pns)
$ unknownPackages pns
Expand Down
1 change: 1 addition & 0 deletions Main.hs
Expand Up @@ -228,6 +228,7 @@ systemInfo = do ver <- ghcVersion
putStrLn $ "Running " ++ pName ++ " using GHC " ++ ver
putStrLn $ " * Executable: " ++ pLoc
putStrLn $ " * Library directory: " ++ libDir
putStrLn ""

-- -----------------------------------------------------------------------------
-- Utility functions
Expand Down

0 comments on commit f2ea498

Please sign in to comment.