diff options
author | Simon Jakobi <simon.jakobi@gmail.com> | 2022-04-02 04:35:39 +0200 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-04-06 08:24:13 +0000 |
commit | 578651ddd609beb5a21747b784f770b94c31ba31 (patch) | |
tree | f149b969e6ea0b14c439df6b3ea33f649a26a927 | |
parent | ed62dc66c6fff433349145b4cc41198effedfab8 (diff) | |
download | haskell-wip/sjakobi/seq-no-size.tar.gz |
Improve seq[D]VarSetwip/sjakobi/seq-no-size
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.hs | 4 |
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 |