summaryrefslogtreecommitdiff
path: root/compiler/utils/UniqFM.hs
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2016-04-26 05:58:24 -0700
committerBartosz Nitka <niteria@gmail.com>2016-04-26 06:40:04 -0700
commitc9bcaf3165586ac214fa694e61c55eb45eb131ab (patch)
treed01bdfd94886ff368517a6057e2dcf77ce8614cc /compiler/utils/UniqFM.hs
parentfd5212fdc26686a85085333af57903a59be809c6 (diff)
downloadhaskell-c9bcaf3165586ac214fa694e61c55eb45eb131ab.tar.gz
Kill varSetElemsWellScoped in quantifyTyVars
varSetElemsWellScoped introduces unnecessary non-determinism in inferred type signatures. Removing this instance required changing the representation of TcDepVars to use deterministic sets. This is the last occurence of varSetElemsWellScoped, allowing me to finally remove it. Test Plan: ./validate I will update the expected outputs when commiting, some reordering of type variables in types is expected. Reviewers: goldfire, simonpj, austin, bgamari Reviewed By: simonpj Subscribers: thomie, simonmar Differential Revision: https://phabricator.haskell.org/D2135 GHC Trac Issues: #4012
Diffstat (limited to 'compiler/utils/UniqFM.hs')
-rw-r--r--compiler/utils/UniqFM.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/utils/UniqFM.hs b/compiler/utils/UniqFM.hs
index 3632926d91..10cc179910 100644
--- a/compiler/utils/UniqFM.hs
+++ b/compiler/utils/UniqFM.hs
@@ -66,7 +66,7 @@ module UniqFM (
lookupWithDefaultUFM, lookupWithDefaultUFM_Directly,
eltsUFM, keysUFM, splitUFM,
ufmToSet_Directly,
- ufmToList,
+ ufmToList, ufmToIntMap,
joinUFM, pprUniqFM, pprUFM, pluralUFM
) where
@@ -298,6 +298,9 @@ eltsUFM (UFM m) = M.elems m
ufmToSet_Directly (UFM m) = M.keysSet m
ufmToList (UFM m) = map (\(k, v) -> (getUnique k, v)) $ M.toList m
+ufmToIntMap :: UniqFM elt -> M.IntMap elt
+ufmToIntMap (UFM m) = m
+
-- Hoopl
joinUFM :: JoinFun v -> JoinFun (UniqFM v)
joinUFM eltJoin l (OldFact old) (NewFact new) = foldUFM_Directly add (NoChange, old) new