summaryrefslogtreecommitdiff
path: root/compiler/GHC/Utils/Outputable.hs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-09-16 17:40:51 +0200
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-09-21 23:05:30 +0200
commiteb1e236fc6ff37c28cee4cf9a2966ee4a0c4c375 (patch)
treef7eb23e5426861da68eb0fac7a667f71684690f3 /compiler/GHC/Utils/Outputable.hs
parent06ccad0de07026ea8128a9951f608bcc67ef23d8 (diff)
downloadhaskell-wip/outputable-cleanup.tar.gz
Minor refactor around Outputablewip/outputable-cleanup
* Replace 'text . show' and 'ppr' with 'int'. * Remove Outputable.hs-boot, no longer needed * Use pprWithCommas * Factor out instructions in AArch64 codegen
Diffstat (limited to 'compiler/GHC/Utils/Outputable.hs')
-rw-r--r--compiler/GHC/Utils/Outputable.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Utils/Outputable.hs b/compiler/GHC/Utils/Outputable.hs
index 4c5eedab34..fd065266d6 100644
--- a/compiler/GHC/Utils/Outputable.hs
+++ b/compiler/GHC/Utils/Outputable.hs
@@ -944,16 +944,16 @@ instance Outputable UTCTime where
ppr = text . formatShow iso8601Format
instance (Outputable a) => Outputable [a] where
- ppr xs = brackets (fsep (punctuate comma (map ppr xs)))
+ ppr xs = brackets (pprWithCommas ppr xs)
instance (Outputable a) => Outputable (NonEmpty a) where
ppr = ppr . NEL.toList
instance (Outputable a) => Outputable (Set a) where
- ppr s = braces (fsep (punctuate comma (map ppr (Set.toList s))))
+ ppr s = braces (pprWithCommas ppr (Set.toList s))
instance Outputable IntSet.IntSet where
- ppr s = braces (fsep (punctuate comma (map ppr (IntSet.toList s))))
+ ppr s = braces (pprWithCommas ppr (IntSet.toList s))
instance (Outputable a, Outputable b) => Outputable (a, b) where
ppr (x,y) = parens (sep [ppr x <> comma, ppr y])