summaryrefslogtreecommitdiff
path: root/compiler/utils/UniqFM.hs
diff options
context:
space:
mode:
authorErik de Castro Lopo <erik.decastrolopo@ambiata.com>2017-01-30 11:47:00 -0500
committerDavid Feuer <David.Feuer@gmail.com>2017-01-30 11:47:02 -0500
commitd2cf5dea70acbffb6039dc5eda31c8ff03b8f43e (patch)
tree1823548797dfcf1752634747ca0ba5819957d254 /compiler/utils/UniqFM.hs
parentf60287c478a5f52bcb7e558c0995f552713772d1 (diff)
downloadhaskell-d2cf5dea70acbffb6039dc5eda31c8ff03b8f43e.tar.gz
Fix deprecation warnings from containers
The functions that were causing warnings were deprecated in containers 0.5 and GHC is already using containers 0.5.9.1. Test Plan: validate Reviewers: rwbarton, bgamari, hsyl20, austin, dfeuer Reviewed By: dfeuer Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3036
Diffstat (limited to 'compiler/utils/UniqFM.hs')
-rw-r--r--compiler/utils/UniqFM.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/utils/UniqFM.hs b/compiler/utils/UniqFM.hs
index be5da8373b..38d94342ad 100644
--- a/compiler/utils/UniqFM.hs
+++ b/compiler/utils/UniqFM.hs
@@ -237,7 +237,7 @@ disjointUFM :: UniqFM elt1 -> UniqFM elt2 -> Bool
disjointUFM (UFM x) (UFM y) = M.null (M.intersection x y)
foldUFM :: (elt -> a -> a) -> a -> UniqFM elt -> a
-foldUFM k z (UFM m) = M.fold k z m
+foldUFM k z (UFM m) = M.foldr k z m
mapUFM :: (elt1 -> elt2) -> UniqFM elt1 -> UniqFM elt2
mapUFM f (UFM m) = UFM (M.map f m)
@@ -285,10 +285,10 @@ ufmToSet_Directly :: UniqFM elt -> S.IntSet
ufmToSet_Directly (UFM m) = M.keysSet m
anyUFM :: (elt -> Bool) -> UniqFM elt -> Bool
-anyUFM p (UFM m) = M.fold ((||) . p) False m
+anyUFM p (UFM m) = M.foldr ((||) . p) False m
allUFM :: (elt -> Bool) -> UniqFM elt -> Bool
-allUFM p (UFM m) = M.fold ((&&) . p) True m
+allUFM p (UFM m) = M.foldr ((&&) . p) True m
seqEltsUFM :: ([elt] -> ()) -> UniqFM elt -> ()
seqEltsUFM seqList = seqList . nonDetEltsUFM
@@ -312,13 +312,13 @@ nonDetKeysUFM (UFM m) = map getUnique $ M.keys m
-- If you use this please provide a justification why it doesn't introduce
-- nondeterminism.
nonDetFoldUFM :: (elt -> a -> a) -> a -> UniqFM elt -> a
-nonDetFoldUFM k z (UFM m) = M.fold k z m
+nonDetFoldUFM k z (UFM m) = M.foldr k z m
-- See Note [Deterministic UniqFM] to learn about nondeterminism.
-- If you use this please provide a justification why it doesn't introduce
-- nondeterminism.
nonDetFoldUFM_Directly:: (Unique -> elt -> a -> a) -> a -> UniqFM elt -> a
-nonDetFoldUFM_Directly k z (UFM m) = M.foldWithKey (k . getUnique) z m
+nonDetFoldUFM_Directly k z (UFM m) = M.foldrWithKey (k . getUnique) z m
-- See Note [Deterministic UniqFM] to learn about nondeterminism.
-- If you use this please provide a justification why it doesn't introduce