[commit: ghc] master: More explicit pretty-printing of promoted TyCons with -dppr-debug (20e6d9d)
Simon Peyton Jones
simonpj at microsoft.com
Mon Apr 30 14:44:06 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/20e6d9d0c321074ac9a8f534d322ed722a55e910
>---------------------------------------------------------------
commit 20e6d9d0c321074ac9a8f534d322ed722a55e910
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Apr 30 13:40:51 2012 +0100
More explicit pretty-printing of promoted TyCons with -dppr-debug
>---------------------------------------------------------------
compiler/types/TyCon.lhs | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/compiler/types/TyCon.lhs b/compiler/types/TyCon.lhs
index a0a69c6..d6a744c 100644
--- a/compiler/types/TyCon.lhs
+++ b/compiler/types/TyCon.lhs
@@ -1482,9 +1482,10 @@ instance Outputable TyCon where
pprPromotionQuote :: TyCon -> SDoc
pprPromotionQuote (PromotedDataCon {}) = char '\'' -- Quote promoted DataCons in types
+pprPromotionQuote (PromotedTyCon {}) = ifPprDebug (char '\'')
pprPromotionQuote _ = empty -- However, we don't quote TyCons in kinds
-- e.g. type family T a :: Bool -> *
- -- cf Trac #5952
+ -- cf Trac #5952. Except with -dppr-debug
instance NamedThing TyCon where
getName = tyConName
More information about the Cvs-ghc
mailing list