diff options
author | Simon Jakobi <simon.jakobi@gmail.com> | 2020-04-04 05:05:16 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-15 13:10:00 -0400 |
commit | 9a9cc0897b676ffd6612562a46600ea98c53a58d (patch) | |
tree | 68c2c11a4b46854ed4355454b3cab181d10e4363 | |
parent | 502647f7583be626319482adf4ea3d905db0006d (diff) | |
download | haskell-9a9cc0897b676ffd6612562a46600ea98c53a58d.tar.gz |
Use foldl' in unionManyUniqDSets
-rw-r--r-- | compiler/GHC/Types/Unique/DSet.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Types/Unique/DSet.hs b/compiler/GHC/Types/Unique/DSet.hs index 1587b89183..20c571284e 100644 --- a/compiler/GHC/Types/Unique/DSet.hs +++ b/compiler/GHC/Types/Unique/DSet.hs @@ -81,8 +81,8 @@ unionUniqDSets :: UniqDSet a -> UniqDSet a -> UniqDSet a unionUniqDSets (UniqDSet s) (UniqDSet t) = UniqDSet (plusUDFM s t) unionManyUniqDSets :: [UniqDSet a] -> UniqDSet a -unionManyUniqDSets [] = emptyUniqDSet -unionManyUniqDSets sets = foldr1 unionUniqDSets sets +unionManyUniqDSets [] = emptyUniqDSet +unionManyUniqDSets (x:xs) = foldl' unionUniqDSets x xs minusUniqDSet :: UniqDSet a -> UniqDSet a -> UniqDSet a minusUniqDSet (UniqDSet s) (UniqDSet t) = UniqDSet (minusUDFM s t) |