diff options
author | David Waern <david.waern@gmail.com> | 2011-10-01 01:56:48 +0200 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2011-10-01 01:56:48 +0200 |
commit | a26a25d047f68051f9e1419a0cec515b62ad7e21 (patch) | |
tree | f93f0f390ed3ac6a704cd614685b249736f15c14 /src/Haddock/Interface.hs | |
parent | 64c6e2464fb3a9207e01b01a17c815284e49808b (diff) | |
parent | b50695a86358fd02b9a0ececbc107bf5274d5f95 (diff) |
Merge branch 'development'
Diffstat (limited to 'src/Haddock/Interface.hs')
-rw-r--r-- | src/Haddock/Interface.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Haddock/Interface.hs b/src/Haddock/Interface.hs index 276621d2..09f01883 100644 --- a/src/Haddock/Interface.hs +++ b/src/Haddock/Interface.hs @@ -142,6 +142,7 @@ createIfaces0 verbosity modules flags instIfaceMap = createIfaces :: Verbosity -> [Flag] -> InstIfaceMap -> ModuleGraph -> Ghc [Interface] createIfaces verbosity flags instIfaceMap mods = do let sortedMods = flattenSCCs $ topSortModuleGraph False mods Nothing + out verbosity normal "Haddock coverage:" (ifaces, _) <- foldM f ([], Map.empty) sortedMods return (reverse ifaces) where @@ -162,11 +163,9 @@ processModule verbosity modsum flags modMap instIfaceMap = do liftIO $ mapM_ putStrLn msg let (haddockable, haddocked) = ifaceHaddockCoverage interface percentage = round (fromIntegral haddocked * 100 / fromIntegral haddockable :: Double) :: Int - coveragemsg = printf "haddock coverage for %s: %7s %3d%%" - (ifaceOrigFilename interface) - (printf "%d/%d" haddocked haddockable :: String) - percentage - out verbosity normal coveragemsg + modString = moduleString (ifaceMod interface) + coverageMsg = printf " %3d%% (%3d /%3d) in '%s'" percentage haddocked haddockable modString + out verbosity normal coverageMsg interface' <- liftIO $ evaluate interface return (Just interface') else |