From 5b98a38a32f2bc8491dc897631be8892919e2143 Mon Sep 17 00:00:00 2001 From: Sebastian Graf Date: Tue, 13 Nov 2018 14:54:54 +0100 Subject: Make `UniqDSet` a newtype Summary: This brings the situation of `UniqDSet` in line with `UniqSet`. @dfeuer said in D3146#92820 that he would do this, but probably never got around to it. Validated locally. Reviewers: AndreasK, mpickering, bgamari, dfeuer, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, carter, dfeuer GHC Trac Issues: #15879, #13114 Differential Revision: https://phabricator.haskell.org/D5313 --- compiler/simplCore/SetLevels.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/simplCore') diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs index 009f7a818b..aeb4755552 100644 --- a/compiler/simplCore/SetLevels.hs +++ b/compiler/simplCore/SetLevels.hs @@ -82,6 +82,7 @@ import IdInfo import Var import VarSet import UniqSet ( nonDetFoldUniqSet ) +import UniqDSet ( getUniqDSet ) import VarEnv import Literal ( litIsTrivial ) import Demand ( StrictSig, Demand, isStrictDmd, splitStrictSig, increaseStrictSigArity ) @@ -1404,7 +1405,7 @@ isFunction (_, AnnLam b e) | isId b = True isFunction _ = False countFreeIds :: DVarSet -> Int -countFreeIds = nonDetFoldUDFM add 0 +countFreeIds = nonDetFoldUDFM add 0 . getUniqDSet -- It's OK to use nonDetFoldUDFM here because we're just counting things. where add :: Var -> Int -> Int -- cgit v1.2.1