diff options
author | Ben Gamari <ben@smart-cactus.org> | 2016-05-10 11:57:02 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-05-12 15:16:07 +0200 |
commit | ba46dd060f959e3c96a74c1546946c3f8bf84dd0 (patch) | |
tree | faa22032f485d0222bb102645971dd82e76236c2 /compiler/utils/UniqDSet.hs | |
parent | e996e85f003e783fc8f9af0da653cdd0058d9646 (diff) | |
download | haskell-wip/foldl.tar.gz |
Use strict foldlswip/foldl
Diffstat (limited to 'compiler/utils/UniqDSet.hs')
-rw-r--r-- | compiler/utils/UniqDSet.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/utils/UniqDSet.hs b/compiler/utils/UniqDSet.hs index 90e9996d1a..191b797072 100644 --- a/compiler/utils/UniqDSet.hs +++ b/compiler/utils/UniqDSet.hs @@ -32,6 +32,7 @@ module UniqDSet ( partitionUniqDSet ) where +import Data.Foldable (foldl') import UniqDFM import UniqSet import Unique @@ -45,13 +46,13 @@ unitUniqDSet :: Uniquable a => a -> UniqDSet a unitUniqDSet x = unitUDFM x x mkUniqDSet :: Uniquable a => [a] -> UniqDSet a -mkUniqDSet = foldl addOneToUniqDSet emptyUniqDSet +mkUniqDSet = foldl' addOneToUniqDSet emptyUniqDSet addOneToUniqDSet :: Uniquable a => UniqDSet a -> a -> UniqDSet a addOneToUniqDSet set x = addToUDFM set x x addListToUniqDSet :: Uniquable a => UniqDSet a -> [a] -> UniqDSet a -addListToUniqDSet = foldl addOneToUniqDSet +addListToUniqDSet = foldl' addOneToUniqDSet delOneFromUniqDSet :: Uniquable a => UniqDSet a -> a -> UniqDSet a delOneFromUniqDSet = delFromUDFM |