[commit: ghc] master: Make -dppr-debug show contents of (TypeError ...) (822141b)
git at git.haskell.org
git at git.haskell.org
Fri Dec 4 14:21:18 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/822141b95174f068872fd4e491da764139ce626f/ghc
>---------------------------------------------------------------
commit 822141b95174f068872fd4e491da764139ce626f
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Dec 4 11:59:08 2015 +0000
Make -dppr-debug show contents of (TypeError ...)
Just for debugging
>---------------------------------------------------------------
822141b95174f068872fd4e491da764139ce626f
compiler/types/TypeRep.hs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/compiler/types/TypeRep.hs b/compiler/types/TypeRep.hs
index 384f1ef..f13ca8a 100644
--- a/compiler/types/TypeRep.hs
+++ b/compiler/types/TypeRep.hs
@@ -790,7 +790,9 @@ pprTyTcApp p tc tys
if gopt Opt_PrintExplicitKinds dflags then pprTcApp p ppr_type tc tys
else pprTyList p ty1 ty2
- | tc `hasKey` errorMessageTypeErrorFamKey = text "(TypeError ...)"
+ | not opt_PprStyle_Debug
+ , tc `hasKey` errorMessageTypeErrorFamKey
+ = text "(TypeError ...)" -- Suppress detail unles you _really_ want to see it
| otherwise
= pprTcApp p ppr_type tc tys
More information about the ghc-commits
mailing list