diff options
| author | simonpj@microsoft.com <unknown> | 2010-11-18 09:00:28 +0000 |
|---|---|---|
| committer | simonpj@microsoft.com <unknown> | 2010-11-18 09:00:28 +0000 |
| commit | 42400001136308c1f4a49a15c1922435518ae58d (patch) | |
| tree | fe6c7361a8332a39062a0574d35a1dab21f745a6 /compiler | |
| parent | bac10a99aba7d223d70b93f398d5239a166e929f (diff) | |
| download | haskell-42400001136308c1f4a49a15c1922435518ae58d.tar.gz | |
Omit bogus test for -XDeriveFunctor
It was duplicated in the case of 'deriving( Functor )'
and wrong for 'deriving( Foldable )'
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/typecheck/TcDeriv.lhs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 02541559c9..30e57ff593 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")) |
