X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcDeriv.lhs;h=1a9a8813e5df8c4c005c567a93a43979f7cc700e;hp=98d7fcf24a9827f0722a246e909d5f31932eb87f;hb=6777144f7522d8db5935737e12fa451ca3211e6d;hpb=4d7f33a5ea53c2bf5900785dc3946c13c04430c1 diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 98d7fcf..1a9a881 100644 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -399,7 +399,10 @@ mkEqnHelp orig tvs cls cls_tys tc_app ; gla_exts <- doptM Opt_GlasgowExts ; overlap_flag <- getOverlapFlag - ; if isDataTyCon tycon then + + -- Be careful to test rep_tc here: in the case of families, we want + -- to check the instance tycon, not the family tycon + ; if isDataTyCon rep_tc then mkDataTypeEqn orig gla_exts full_tvs cls cls_tys tycon full_tc_args rep_tc rep_tc_args else