- | cls_key == dataClassKey = Just (cond_mayDeriveDataTypeable `andCond` cond_std `andCond` cond_noUnliftedArgs)
- | cls_key == functorClassKey = Just (cond_functorOK True) -- NB: no cond_std!
- | cls_key == foldableClassKey = Just (cond_functorOK False) -- Functor/Fold/Trav works ok for rank-n types
- | cls_key == traversableClassKey = Just (cond_functorOK False)
- | getName cls `elem` typeableClassNames = Just (cond_mayDeriveDataTypeable `andCond` cond_typeableOK)
+ | cls_key == dataClassKey = Just (checkFlag Opt_DeriveDataTypeable `andCond`
+ cond_std `andCond` cond_noUnliftedArgs)
+ | cls_key == functorClassKey = Just (checkFlag Opt_DeriveFunctor `andCond`
+ cond_functorOK True) -- NB: no cond_std!
+ | cls_key == foldableClassKey = Just (checkFlag Opt_DeriveFoldable `andCond`
+ cond_functorOK False) -- Functor/Fold/Trav works ok for rank-n types
+ | cls_key == traversableClassKey = Just (checkFlag Opt_DeriveTraversable `andCond`
+ cond_functorOK False)
+ | getName cls `elem` typeableClassNames = Just (checkFlag Opt_DeriveDataTypeable `andCond` cond_typeableOK)