X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Ftypecheck%2FTcDeriv.lhs;h=5053a0668e0527078adedf763f4c793d0db60c34;hb=1fab5eeaf45798ee7832497d6518883be451bfca;hp=419ec948b24c617343de11af882a12de79ce4375;hpb=a854a0b9cefefe8cc8e96125ff13489bf96bf5a6;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 419ec94..5053a06 100644 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -1314,7 +1314,9 @@ standaloneCtxt ty = hang (ptext (sLit "In the stand-alone deriving instance for" derivInstCtxt :: Class -> [Type] -> Message derivInstCtxt clas inst_tys - = ptext (sLit "When deriving the instance for") <+> parens (pprClassPred clas inst_tys) + = vcat [ptext (sLit "Alternative fix: use a standalone 'deriving instance' declaration"), + nest 2 (ptext (sLit "instead, so you can specify the instance context yourself")), + ptext (sLit "When deriving the instance for") <+> parens (pprClassPred clas inst_tys)] badDerivedPred :: PredType -> Message badDerivedPred pred