summaryrefslogtreecommitdiff
path: root/compiler/GHC/Utils
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-09-06 17:14:41 +0200
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-09-06 18:23:04 +0200
commit780ad28f2f064c1e4105b151c184ff1206833695 (patch)
treecc5475103ec5ae7abe0f1e6f4093fcd0d58bdf42 /compiler/GHC/Utils
parent6560d4416ec1dc8a25c842523c7ae83c271b9315 (diff)
downloadhaskell-wip/cleanup-outputable.tar.gz
Remove Outputable Char instancewip/cleanup-outputable
Use 'text' instead of 'ppr'. Using 'ppr' on the list "hello" rendered as "h,e,l,l,o".
Diffstat (limited to 'compiler/GHC/Utils')
-rw-r--r--compiler/GHC/Utils/Outputable.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Utils/Outputable.hs b/compiler/GHC/Utils/Outputable.hs
index bd8204f856..a9b8ca384e 100644
--- a/compiler/GHC/Utils/Outputable.hs
+++ b/compiler/GHC/Utils/Outputable.hs
@@ -895,8 +895,8 @@ keyword = coloured Col.colBold
class Outputable a where
ppr :: a -> SDoc
-instance Outputable Char where
- ppr c = text [c]
+-- There's no Outputable for Char; it's too easy to use Outputable
+-- on String and have ppr "hello" rendered as "h,e,l,l,o".
instance Outputable Bool where
ppr True = text "True"