X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcDeriv.lhs;h=30e57ff593fb18804df1f595d647758cb635b9ad;hb=d70f8919d9fde9bf0ec1438cafb617588400e09c;hp=02541559c94ed16ce66be1b2ec3faa74d7219eaf;hpb=bf6dd8335a357438a3cf60c8f3c4dbbf880ccb3f;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 0254155..30e57ff 100644 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -936,10 +936,7 @@ cond_functorOK :: Bool -> Condition -- (c) don't use argument in the wrong place, e.g. data T a = T (X a a) -- (d) optionally: don't use function types -- (e) no "stupid context" on data type -cond_functorOK allowFunctions (dflags, rep_tc) - | not (xopt Opt_DeriveFunctor dflags) - = Just (ptext (sLit "You need -XDeriveFunctor to derive an instance for this class")) - +cond_functorOK allowFunctions (_, rep_tc) | null tc_tvs = Just (ptext (sLit "Data type") <+> quotes (ppr rep_tc) <+> ptext (sLit "has no parameters"))