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/HpcCombine.hs | |
parent | 004e86c38b8ba9380bfc58341d04d11f73b53a1a (diff) | |
download | haskell-wip/coverage.tar.gz |
hpc: Use IntMap rather than Listwip/coverage
Diffstat (limited to 'utils/hpc/HpcCombine.hs')
-rw-r--r-- | utils/hpc/HpcCombine.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/utils/hpc/HpcCombine.hs b/utils/hpc/HpcCombine.hs index ab4b4dd15c..0053fbbf8d 100644 --- a/utils/hpc/HpcCombine.hs +++ b/utils/hpc/HpcCombine.hs @@ -13,6 +13,7 @@ import HpcFlags import Control.Monad import qualified Data.Set as Set import qualified Data.Map as Map +import qualified Data.IntMap as IM import qualified Data.Text as T ------------------------------------------------------------------------------ @@ -141,7 +142,7 @@ mergeTix modComb f || tixModuleTickCount tm1 /= tixModuleTickCount tm2 -> error $ "mismatched in module " ++ T.unpack m | otherwise -> - mkTixModule' m (tixModuleHash tm1) (tixModuleTickCount tm1) (zipWith f (tixModuleTixs tm1) (tixModuleTixs tm2)) + mkTixModule m (tixModuleHash tm1) (mergeTickCounts f (tixModuleTixs tm1) (tixModuleTixs tm2)) (Just m1,Nothing) -> m1 (Nothing,Just m2) -> @@ -189,9 +190,12 @@ instance Strict Tix where strict (Tix t1) = Tix $! strict t1 +instance Strict TickCounts where + strict i = i + instance Strict TixModule where - strict (TixModule m1 p1 i1 t1) = - ((((TixModule $! strict m1) $! strict p1) $! strict i1) $! strict t1) + strict (TixModule m1 p1 t1) = + (((TixModule $! strict m1) $! strict p1)) $! strict t1 instance Strict T.Text where strict i = i |