summaryrefslogtreecommitdiff
path: root/compiler/simplCore
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2018-11-13 14:54:54 +0100
committerSebastian Graf <sebastian.graf@kit.edu>2018-11-13 14:54:55 +0100
commit5b98a38a32f2bc8491dc897631be8892919e2143 (patch)
tree0de170c19d2ad70b0bf59b29c6e5353c5c228b4f /compiler/simplCore
parent0f2ac24c26fb951cc81100085c7773906a241523 (diff)
downloadhaskell-5b98a38a32f2bc8491dc897631be8892919e2143.tar.gz
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
Diffstat (limited to 'compiler/simplCore')
-rw-r--r--compiler/simplCore/SetLevels.hs3
1 files changed, 2 insertions, 1 deletions
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