X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypes%2FType.lhs;h=fd817956d23356001bbb09a08291ae30696a8a14;hb=1a1164f580d910ad41cb52a17c989cef02010dae;hp=147f54678b213394941f49d0e1cb7f14b4a24bb8;hpb=3548802de235eca280982270463db84910ee3748;p=ghc-hetmet.git diff --git a/compiler/types/Type.lhs b/compiler/types/Type.lhs index 147f546..fd81795 100644 --- a/compiler/types/Type.lhs +++ b/compiler/types/Type.lhs @@ -95,7 +95,7 @@ module Type ( substPred, substTyVar, substTyVars, substTyVarBndr, deShadowTy, lookupTyVar, -- Pretty-printing - pprType, pprParendType, pprTyThingCategory, pprForAll, + pprType, pprParendType, pprTypeApp, pprTyThingCategory, pprForAll, pprPred, pprTheta, pprThetaArrow, pprClassPred, pprKind, pprParendKind ) where @@ -611,11 +611,14 @@ tyConOrigHead tycon = case tyConFamInst_maybe tycon of Just famInst -> famInst -- Pretty prints a tycon, using the family instance in case of a --- representation tycon. -pprSourceTyCon tycon | Just (repTyCon, tys) <- tyConFamInst_maybe tycon = - ppr $ repTyCon `TyConApp` tys -- can't be FunTyCon - | otherwise = - ppr tycon +-- representation tycon. For example +-- e.g. data T [a] = ... +-- In that case we want to print `T [a]', where T is the family TyCon +pprSourceTyCon tycon + | Just (repTyCon, tys) <- tyConFamInst_maybe tycon + = ppr $ repTyCon `TyConApp` tys -- can't be FunTyCon + | otherwise + = ppr tycon \end{code}