Commit 0f7381bf authored by Simon Peyton Jones's avatar Simon Peyton Jones

Don't print roles for data instances

See Trac #8672
parent 44dc0aad
......@@ -209,7 +209,9 @@ pprTyCon ss tyCon
pp_roles suppress_if
= sdocWithDynFlags $ \dflags ->
let roles = suppressKinds dflags (tyConKind tyCon) (tyConRoles tyCon)
in ppUnless (all suppress_if roles) $
in ppUnless (isFamInstTyCon tyCon || all suppress_if roles) $
-- Don't display roles for data family instances (yet)
-- See discussion on Trac #8672.
ptext (sLit "type role") <+> ppr tyCon <+> hsep (map ppr roles)
pp_tc_with_kind = vcat [ pp_roles (const True)
data B1 a = B1 a
type role T5417.R:FB1 nominal
data instance C.F (B1 a) = B2 a
type role D nominal
data family D a
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment