diff --git a/compiler/main/PprTyThing.hs b/compiler/main/PprTyThing.hs index fb92b5a87c2316ce840603c6f3c2d6ab3aa9a6c5..1fd5d0cbcfcedccb61239ea22eda05a22c0281e6 100644 --- a/compiler/main/PprTyThing.hs +++ b/compiler/main/PprTyThing.hs @@ -104,6 +104,7 @@ pprTyThingHdr = ppr_ty_thing Nothing -- 'TyCon' tidying happening in 'tyThingToIfaceDecl'. See #8776 for details. ppr_ty_thing :: Maybe ShowSub -> TyThing -> SDoc ppr_ty_thing mss tyThing = case tyThing of + AnId id -> pprId id ATyCon tyCon -> case mss of Nothing -> pprTyConHdr tyCon Just ss -> pprTyCon ss tyCon @@ -147,6 +148,11 @@ pprClassHdr cls where (tvs, funDeps) = classTvsFds cls +pprId :: Var -> SDoc +pprId ident + = hang (ppr_bndr ident <+> dcolon) + 2 (pprTypeForUser (idType ident)) + pprTypeForUser :: Type -> SDoc -- We do two things here. -- a) We tidy the type, regardless