summaryrefslogtreecommitdiff
path: root/compiler/utils/UniqSet.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils/UniqSet.hs')
-rw-r--r--compiler/utils/UniqSet.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/utils/UniqSet.hs b/compiler/utils/UniqSet.hs
index ede900a842..d9d51f4c75 100644
--- a/compiler/utils/UniqSet.hs
+++ b/compiler/utils/UniqSet.hs
@@ -128,6 +128,12 @@ mapUniqSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b
-- the invariant.
newtype UniqSet a = UniqSet {getUniqSet' :: UniqFM a} deriving Data
+
+-- Two 'UniqSet's are considered equal if they contain the same
+-- uniques.
+instance Eq (UniqSet a) where
+ UniqSet a == UniqSet b = equalKeysUFM a b
+
getUniqSet :: UniqSet a -> UniqFM a
getUniqSet = getUniqSet'