- (vcat [ptext SLIT("too hard for cunning newtype deriving"),
- ppr n_tyvars_to_keep,
- ppr n_args_to_keep,
- ppr eta_ok,
- ppr (isRecursiveTyCon tycon)
+ (vcat [ptext SLIT("even with cunning newtype deriving:"),
+ if right_arity then empty else
+ quotes (ppr (mkClassPred clas tys)) <+> ptext SLIT("does not have arity 1"),
+ if n_tyvars_to_keep >= 0 && n_args_to_keep >= 0 then empty else
+ ptext SLIT("the type constructor has wrong kind"),
+ if n_args_to_keep >= 0 then empty else
+ ptext SLIT("representation type has wrong kind"),
+ if eta_ok then empty else
+ ptext SLIT("the eta-reduction property does not hold"),
+ if not (isRecursiveTyCon tycon) then empty else
+ ptext SLIT("the newtype is recursive")