summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklebinger.andreas@gmx.at <klebinger.andreas@gmx.at>2019-04-15 23:48:02 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-04-17 23:25:10 -0400
commitf0f495f0c4e16520adea83e82885dc08fa0c38a3 (patch)
tree669e8e906c1e96c8e3abe78289d5f3c70680ac2f
parente142ec99e91ef4bdffd367780e945526ec6ef7e2 (diff)
downloadhaskell-f0f495f0c4e16520adea83e82885dc08fa0c38a3.tar.gz
Add an Outputable instance for SDoc with ppr = id.
When printf debugging this can be helpful.
-rw-r--r--compiler/utils/Outputable.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs
index 7c2eaed62d..fee257d98a 100644
--- a/compiler/utils/Outputable.hs
+++ b/compiler/utils/Outputable.hs
@@ -327,6 +327,10 @@ data SDocContext = SDC
instance IsString SDoc where
fromString = text
+-- The lazy programmer's friend.
+instance Outputable SDoc where
+ ppr = id
+
initSDocContext :: DynFlags -> PprStyle -> SDocContext
initSDocContext dflags sty = SDC
{ sdocStyle = sty