summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Jakobi <simon.jakobi@gmail.com>2022-04-02 04:35:39 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-08 03:00:38 -0400
commitb2dbcc7d28f11de92441fae3f20c6dc35498469f (patch)
tree0466a2c08bc67c5a0e0f712d3db4ca08377731fb
parentb3d6d23d11a19d5304538b4a55bd9b93f39a3e63 (diff)
downloadhaskell-b2dbcc7d28f11de92441fae3f20c6dc35498469f.tar.gz
Improve seq[D]VarSet
Previously, the use of size[D]VarSet would involve a traversal of the entire underlying IntMap. Since IntMaps are already spine-strict, this is unnecessary.
-rw-r--r--compiler/GHC/Types/Var/Set.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Types/Var/Set.hs b/compiler/GHC/Types/Var/Set.hs
index e038f6c93c..9eed5e2cd2 100644
--- a/compiler/GHC/Types/Var/Set.hs
+++ b/compiler/GHC/Types/Var/Set.hs
@@ -195,7 +195,7 @@ transCloVarSet fn seeds
new_vs = fn candidates `minusVarSet` acc
seqVarSet :: VarSet -> ()
-seqVarSet s = sizeVarSet s `seq` ()
+seqVarSet s = s `seq` ()
-- | Determines the pluralisation suffix appropriate for the length of a set
-- in the same way that plural from Outputable does for lists.
@@ -323,7 +323,7 @@ delDVarSetList :: DVarSet -> [Var] -> DVarSet
delDVarSetList = delListFromUniqDSet
seqDVarSet :: DVarSet -> ()
-seqDVarSet s = sizeDVarSet s `seq` ()
+seqDVarSet s = s `seq` ()
-- | Add a list of variables to DVarSet
extendDVarSetList :: DVarSet -> [Var] -> DVarSet