summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-12-01 16:27:38 -0500
committerBen Gamari <ben@smart-cactus.org>2020-02-06 11:55:41 -0500
commit29b72c00a692b442605b022fcc15c4454ed1c3de (patch)
treefc1748f506564cc61c2f1ebbc0338c6819d34f97
parente8004e5d1e993363a89b0107380604c5bc02be6b (diff)
downloadhaskell-29b72c00a692b442605b022fcc15c4454ed1c3de.tar.gz
VarSet: Introduce nonDetFoldVarSet
-rw-r--r--compiler/basicTypes/VarSet.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/basicTypes/VarSet.hs b/compiler/basicTypes/VarSet.hs
index c3b25970f2..80493ef9d1 100644
--- a/compiler/basicTypes/VarSet.hs
+++ b/compiler/basicTypes/VarSet.hs
@@ -23,6 +23,7 @@ module VarSet (
sizeVarSet, seqVarSet,
elemVarSetByKey, partitionVarSet,
pluralVarSet, pprVarSet,
+ nonDetFoldVarSet,
-- * Deterministic Var set types
DVarSet, DIdSet, DTyVarSet, DTyCoVarSet,
@@ -151,6 +152,9 @@ allVarSet = uniqSetAll
mapVarSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b
mapVarSet = mapUniqSet
+nonDetFoldVarSet :: (Var -> a -> a) -> a -> VarSet -> a
+nonDetFoldVarSet = nonDetFoldUniqSet
+
fixVarSet :: (VarSet -> VarSet) -- Map the current set to a new set
-> VarSet -> VarSet
-- (fixVarSet f s) repeatedly applies f to the set s,