Skip to content
Snippets Groups Projects
Commit 92191a39 authored by jpm@cs.ox.ac.uk's avatar jpm@cs.ox.ac.uk
Browse files

Allow deriving Typeable for more tycons

parent c041b620
No related merge requests found
...@@ -683,7 +683,8 @@ mkEqnHelp :: CtOrigin -> [TyVar] -> Class -> [Type] -> Type ...@@ -683,7 +683,8 @@ mkEqnHelp :: CtOrigin -> [TyVar] -> Class -> [Type] -> Type
mkEqnHelp orig tvs cls cls_tys tc_app mtheta mkEqnHelp orig tvs cls cls_tys tc_app mtheta
| Just (tycon, tc_args) <- tcSplitTyConApp_maybe tc_app | 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 = mk_alg_eqn tycon tc_args
| otherwise | otherwise
= failWithTc (derivingThingErr False cls cls_tys tc_app = failWithTc (derivingThingErr False cls cls_tys tc_app
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment