Commit 42400001 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

Omit bogus test for -XDeriveFunctor

It was duplicated in the case of 'deriving( Functor )'
and wrong for 'deriving( Foldable )'
parent bac10a99
......@@ -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"))
......
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