summaryrefslogtreecommitdiff
path: root/compiler/utils/UniqSet.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2016-05-10 11:57:02 +0200
committerBen Gamari <ben@smart-cactus.org>2016-05-12 15:16:07 +0200
commitba46dd060f959e3c96a74c1546946c3f8bf84dd0 (patch)
treefaa22032f485d0222bb102645971dd82e76236c2 /compiler/utils/UniqSet.hs
parente996e85f003e783fc8f9af0da653cdd0058d9646 (diff)
downloadhaskell-wip/foldl.tar.gz
Use strict foldlswip/foldl
Diffstat (limited to 'compiler/utils/UniqSet.hs')
-rw-r--r--compiler/utils/UniqSet.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/utils/UniqSet.hs b/compiler/utils/UniqSet.hs
index a316f53370..32a5a22c78 100644
--- a/compiler/utils/UniqSet.hs
+++ b/compiler/utils/UniqSet.hs
@@ -33,6 +33,7 @@ module UniqSet (
partitionUniqSet
) where
+import Data.Foldable ( foldl' )
import UniqFM
import Unique
@@ -93,11 +94,11 @@ type UniqSet a = UniqFM a
emptyUniqSet = emptyUFM
unitUniqSet x = unitUFM x x
-mkUniqSet = foldl addOneToUniqSet emptyUniqSet
+mkUniqSet = foldl' addOneToUniqSet emptyUniqSet
addOneToUniqSet set x = addToUFM set x x
addOneToUniqSet_C f set x = addToUFM_C f set x x
-addListToUniqSet = foldl addOneToUniqSet
+addListToUniqSet = foldl' addOneToUniqSet
delOneFromUniqSet = delFromUFM
delOneFromUniqSet_Directly = delFromUFM_Directly