diff options
author | Bartosz Nitka <niteria@gmail.com> | 2016-05-12 08:01:34 -0700 |
---|---|---|
committer | Bartosz Nitka <niteria@gmail.com> | 2016-05-12 09:34:08 -0700 |
commit | 5416fadb7387cbe89752faa875b2dade60655cf2 (patch) | |
tree | f320b60f572746a920dda5906c129e9deeafa591 /compiler/utils/UniqFM.hs | |
parent | 7c0b595e55d31f9f89e6dede11981e942c5bb32f (diff) | |
download | haskell-5416fadb7387cbe89752faa875b2dade60655cf2.tar.gz |
Refactor some ppr functions to use pprUFM
Nondeterminism doesn't matter in these places and pprUFM makes
it obvious. I've flipped the order of arguments for convenience.
Test Plan: ./validate
Reviewers: simonmar, bgamari, austin, simonpj
Reviewed By: simonpj
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2205
GHC Trac Issues: #4012
Diffstat (limited to 'compiler/utils/UniqFM.hs')
-rw-r--r-- | compiler/utils/UniqFM.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/utils/UniqFM.hs b/compiler/utils/UniqFM.hs index 2ff635268d..f49dabc904 100644 --- a/compiler/utils/UniqFM.hs +++ b/compiler/utils/UniqFM.hs @@ -349,12 +349,12 @@ pprUniqFM ppr_elt ufm -- The order of variables is non-deterministic and for pretty-printing that -- shouldn't be a problem. -- Having this function helps contain the non-determinism created with --- eltsUFM. -pprUFM :: ([a] -> SDoc) -- ^ The pretty printing function to use on the elements - -> UniqFM a -- ^ The things to be pretty printed +-- nonDetEltsUFM. +pprUFM :: UniqFM a -- ^ The things to be pretty printed + -> ([a] -> SDoc) -- ^ The pretty printing function to use on the elements -> SDoc -- ^ 'SDoc' where the things have been pretty -- printed -pprUFM pp ufm = pp (nonDetEltsUFM ufm) +pprUFM ufm pp = pp (nonDetEltsUFM ufm) -- | Determines the pluralisation suffix appropriate for the length of a set -- in the same way that plural from Outputable does for lists. |