diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-11-04 18:39:46 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-11-05 14:26:32 -0400 |
commit | 8be05be5b3215b4666253baf3afd2a3b8a27a0cc (patch) | |
tree | e516cc49ea12f8a39b315327946faef80f40b95b /utils/hpc/HpcReport.hs | |
parent | 004e86c38b8ba9380bfc58341d04d11f73b53a1a (diff) | |
download | haskell-wip/coverage.tar.gz |
hpc: Use IntMap rather than Listwip/coverage
Diffstat (limited to 'utils/hpc/HpcReport.hs')
-rw-r--r-- | utils/hpc/HpcReport.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/hpc/HpcReport.hs b/utils/hpc/HpcReport.hs index 164e8912af..7cdd0c2e29 100644 --- a/utils/hpc/HpcReport.hs +++ b/utils/hpc/HpcReport.hs @@ -151,16 +151,16 @@ single (LocalBox _) = True single (BinBox {}) = False modInfo :: Flags -> Bool -> TixModule -> IO ModInfo -modInfo hpcflags qualDecList tix@(TixModule moduleName _ _ tickCounts) = do +modInfo hpcflags qualDecList tix@(TixModule moduleName _ _) = do Mix _ _ _ _ mes <- readMixWithFlags hpcflags (Right tix) - return (q (accumCounts (zip (map snd mes) tickCounts) miZero)) + return (q (accumCounts (zip (map snd mes) (tickCountsToList $ tixModuleTixs tix)) miZero)) where q mi | qualDecList = mi{decPaths = map (T.unpack moduleName:) (decPaths mi)} | otherwise = mi modReport :: Flags -> TixModule -> IO () -modReport hpcflags tix@(TixModule moduleName _ _ _) = do +modReport hpcflags tix@(TixModule moduleName _ _) = do mi <- modInfo hpcflags False tix if xmlOutput hpcflags then putStrLn $ " <module name = " ++ show moduleName ++ ">" @@ -225,7 +225,7 @@ report_main hpcflags (progName:mods) = do makeReport hpcflags1 progName $ sortBy (\ mod1 mod2 -> tixModuleName mod1 `compare` tixModuleName mod2) $ [ tix' - | tix'@(TixModule m _ _ _) <- tickCounts + | tix'@(TixModule m _ _) <- tickCounts , allowModule hpcflags1 m ] Nothing -> hpcError report_plugin $ "unable to find tix file for:" ++ progName |