diff options
| author | David Feuer <david.feuer@gmail.com> | 2017-03-01 13:47:39 -0500 |
|---|---|---|
| committer | David Feuer <David.Feuer@gmail.com> | 2017-03-01 13:47:41 -0500 |
| commit | cbe569a56e2a82bb93a008beb56869d9a6a1d047 (patch) | |
| tree | 4143ecfabf7b171159c2980e545fe66e0118e1f0 /compiler/utils/UniqFM.hs | |
| parent | 701256df88c61a2eee4cf00a59e61ef76a57b4b4 (diff) | |
| download | haskell-cbe569a56e2a82bb93a008beb56869d9a6a1d047.tar.gz | |
Upgrade UniqSet to a newtype
The fundamental problem with `type UniqSet = UniqFM` is that `UniqSet`
has a key invariant `UniqFM` does not. For example, `fmap` over
`UniqSet` will generally produce nonsense.
* Upgrade `UniqSet` from a type synonym to a newtype.
* Remove unused and shady `extendVarSet_C` and `addOneToUniqSet_C`.
* Use cached unique in `tyConsOfType` by replacing
`unitNameEnv (tyConName tc) tc` with `unitUniqSet tc`.
Reviewers: austin, hvr, goldfire, simonmar, niteria, bgamari
Reviewed By: niteria
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3146
Diffstat (limited to 'compiler/utils/UniqFM.hs')
| -rw-r--r-- | compiler/utils/UniqFM.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/utils/UniqFM.hs b/compiler/utils/UniqFM.hs index 49ceb89d90..8214f1704b 100644 --- a/compiler/utils/UniqFM.hs +++ b/compiler/utils/UniqFM.hs @@ -233,7 +233,7 @@ plusUFMList = foldl' plusUFM emptyUFM minusUFM :: UniqFM elt1 -> UniqFM elt2 -> UniqFM elt1 minusUFM (UFM x) (UFM y) = UFM (M.difference x y) -intersectUFM :: UniqFM elt -> UniqFM elt -> UniqFM elt +intersectUFM :: UniqFM elt1 -> UniqFM elt2 -> UniqFM elt1 intersectUFM (UFM x) (UFM y) = UFM (M.intersection x y) intersectUFM_C |
