- cant_derive_err = derivingThingErr cls cls_tys tc_app
- (vcat [ptext (sLit "even with cunning newtype deriving:"),
- if isRecursiveTyCon tycon then
- ptext (sLit "the newtype may be recursive")
- else empty,
- if not right_arity then
- quotes (ppr (mkClassPred cls cls_tys)) <+> ptext (sLit "does not have arity 1")
- else empty,
- if not (n_tyargs_to_keep >= 0) then
- ptext (sLit "the type constructor has wrong kind")
- else if not (n_args_to_keep >= 0) then
- ptext (sLit "the representation type has wrong kind")
- else if not eta_ok then
- ptext (sLit "the eta-reduction property does not hold")
- else empty
- ])
+ cant_derive_err = vcat [ptext (sLit "even with cunning newtype deriving:"),
+ if isRecursiveTyCon tycon then
+ ptext (sLit "the newtype may be recursive")
+ else empty,
+ if not right_arity then
+ quotes (ppr (mkClassPred cls cls_tys)) <+> ptext (sLit "does not have arity 1")
+ else empty,
+ if not (n_tyargs_to_keep >= 0) then
+ ptext (sLit "the type constructor has wrong kind")
+ else if not (n_args_to_keep >= 0) then
+ ptext (sLit "the representation type has wrong kind")
+ else if not eta_ok then
+ ptext (sLit "the eta-reduction property does not hold")
+ else empty
+ ]