diff options
author | Willem Van Onsem <3482343+KommuSoft@users.noreply.github.com> | 2020-12-08 18:26:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 18:26:55 +0100 |
commit | 39996e2d2ef4b69706bf279a75575bde240b1f1f (patch) | |
tree | fd583c159151a38f6a4d54313714c230cf19599e /haddock-api/src | |
parent | 96a60e218b35df611ee56c4bdd8408ec4375e6ca (diff) |
simplify calculating percentages fixing #1194 (#1236)
Diffstat (limited to 'haddock-api/src')
-rw-r--r-- | haddock-api/src/Haddock/Interface.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs index d1e1dae1..6dcfa594 100644 --- a/haddock-api/src/Haddock/Interface.hs +++ b/haddock-api/src/Haddock/Interface.hs @@ -182,7 +182,7 @@ processModule verbosity modsum flags modMap instIfaceMap = do liftIO $ mapM_ putStrLn (nub msgs) dflags <- getDynFlags let (haddockable, haddocked) = ifaceHaddockCoverage interface - percentage = floor (fromIntegral haddocked * 100 / fromIntegral haddockable :: Double) :: Int + percentage = div (haddocked * 100) haddockable modString = moduleString (ifaceMod interface) coverageMsg = printf " %3d%% (%3d /%3d) in '%s'" percentage haddocked haddockable modString header = case ifaceDoc interface of |