Add an Outputable instance for SDoc with ppr = id.
authorklebinger.andreas@gmx.at <klebinger.andreas@gmx.at>
Mon, 15 Apr 2019 21:48:02 +0000 (23:48 +0200)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Thu, 18 Apr 2019 03:25:10 +0000 (23:25 -0400)
When printf debugging this can be helpful.

compiler/utils/Outputable.hs

index 7c2eaed..fee257d 100644 (file)
@@ -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