diff options
| author | simonpj@microsoft.com <unknown> | 2009-11-06 17:40:32 +0000 |
|---|---|---|
| committer | simonpj@microsoft.com <unknown> | 2009-11-06 17:40:32 +0000 |
| commit | d91c667d5cfb835b0d60ffb6264934c1b49a44aa (patch) | |
| tree | f06acb7732da52cff9c8077779c741c6242e0163 | |
| parent | bcadca676448e38427b910bad5d7063f948a99c8 (diff) | |
| download | haskell-d91c667d5cfb835b0d60ffb6264934c1b49a44aa.tar.gz | |
Improve debug-printing of the type environment
| -rw-r--r-- | compiler/typecheck/TcRnDriver.lhs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/typecheck/TcRnDriver.lhs b/compiler/typecheck/TcRnDriver.lhs index 5a669b4b74..5cfb612fe8 100644 --- a/compiler/typecheck/TcRnDriver.lhs +++ b/compiler/typecheck/TcRnDriver.lhs @@ -40,6 +40,7 @@ import TcHsSyn import TcExpr import TcRnMonad import TcType +import Coercion import Inst import FamInst import InstEnv @@ -74,6 +75,7 @@ import Name import NameEnv import NameSet import TyCon +import TysPrim import TysWiredIn import SrcLoc import HscTypes @@ -1580,8 +1582,12 @@ ppr_tydecls tycons where le_sig tycon1 tycon2 = getOccName tycon1 <= getOccName tycon2 ppr_tycon tycon - | isCoercionTyCon tycon = ptext (sLit "coercion") <+> ppr tycon + | isCoercionTyCon tycon + = sep [ptext (sLit "coercion") <+> ppr tycon <+> ppr tvs + , nest 2 (dcolon <+> pprEqPred (coercionKind (mkTyConApp tycon (mkTyVarTys tvs))))] | otherwise = ppr (tyThingToIfaceDecl (ATyCon tycon)) + where + tvs = take (tyConArity tycon) alphaTyVars ppr_rules :: [CoreRule] -> SDoc ppr_rules [] = empty |
