X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcGenDeriv.lhs;fp=compiler%2Ftypecheck%2FTcGenDeriv.lhs;h=d15bb05728a09a753a467f589b5a7ae583fb8146;hp=525f0950b0b08d3e2aed107fde38b1d4c25bf843;hb=369d62baac8b930320ec1b604fb6625b14d0402d;hpb=1a9245caefb80a3c4c5965aaacdf9a607e792e1c diff --git a/compiler/typecheck/TcGenDeriv.lhs b/compiler/typecheck/TcGenDeriv.lhs index 525f095..d15bb05 100644 --- a/compiler/typecheck/TcGenDeriv.lhs +++ b/compiler/typecheck/TcGenDeriv.lhs @@ -1684,13 +1684,13 @@ genAuxBind loc (GenCon2Tag tycon) nlHsLit (HsIntPrim (toInteger ((dataConTag con) - fIRST_TAG)))) genAuxBind loc (GenTag2Con tycon) - = ASSERT( null (tyConTyVars tycon) ) - (mk_FunBind loc rdr_name + = (mk_FunBind loc rdr_name [([nlConVarPat intDataCon_RDR [a_RDR]], nlHsApp (nlHsVar tagToEnum_RDR) a_Expr)], L loc (TypeSig (L loc rdr_name) (L loc sig_ty))) where - sig_ty = HsCoreTy $ intTy `mkFunTy` mkParentType tycon + sig_ty = HsCoreTy $ mkForAllTys (tyConTyVars tycon) $ + intTy `mkFunTy` mkParentType tycon rdr_name = tag2con_RDR tycon