Skip to content

Commit

Permalink
Allow deriving Typeable for more tycons
Browse files Browse the repository at this point in the history
  • Loading branch information
dreixel committed May 7, 2013
1 parent c041b62 commit 92191a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/typecheck/TcDeriv.lhs
Expand Up @@ -683,7 +683,8 @@ mkEqnHelp :: CtOrigin -> [TyVar] -> Class -> [Type] -> Type
mkEqnHelp orig tvs cls cls_tys tc_app mtheta
| Just (tycon, tc_args) <- tcSplitTyConApp_maybe tc_app
, isAlgTyCon tycon -- Check for functions, primitive types etc
, className cls == typeableClassName || isAlgTyCon tycon
-- Avoid functions, primitive types, etc, unless it's Typeable
= mk_alg_eqn tycon tc_args
| otherwise
= failWithTc (derivingThingErr False cls cls_tys tc_app
Expand Down

0 comments on commit 92191a3

Please sign in to comment.