summaryrefslogtreecommitdiff
path: root/compiler/utils/UniqDSet.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/UniqDSet.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/UniqDSet.hs')
-rw-r--r--compiler/utils/UniqDSet.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/utils/UniqDSet.hs b/compiler/utils/UniqDSet.hs
index 45ed241df1..90e9996d1a 100644
--- a/compiler/utils/UniqDSet.hs
+++ b/compiler/utils/UniqDSet.hs
@@ -19,7 +19,7 @@ module UniqDSet (
mkUniqDSet,
addOneToUniqDSet, addListToUniqDSet,
unionUniqDSets, unionManyUniqDSets,
- minusUniqDSet,
+ minusUniqDSet, uniqDSetMinusUniqSet,
intersectUniqDSets,
intersectsUniqDSets,
foldUniqDSet,
@@ -33,6 +33,7 @@ module UniqDSet (
) where
import UniqDFM
+import UniqSet
import Unique
type UniqDSet a = UniqDFM a
@@ -65,9 +66,12 @@ unionManyUniqDSets :: [UniqDSet a] -> UniqDSet a
unionManyUniqDSets [] = emptyUniqDSet
unionManyUniqDSets sets = foldr1 unionUniqDSets sets
-minusUniqDSet :: UniqDSet a -> UniqDSet a -> UniqDSet a
+minusUniqDSet :: UniqDSet a -> UniqDSet a -> UniqDSet a
minusUniqDSet = minusUDFM
+uniqDSetMinusUniqSet :: UniqDSet a -> UniqSet a -> UniqDSet a
+uniqDSetMinusUniqSet = udfmMinusUFM
+
intersectUniqDSets :: UniqDSet a -> UniqDSet a -> UniqDSet a
intersectUniqDSets = intersectUDFM