Include the "stupid theta" in the type of $con2tag
authorsimonpj@microsoft.com <unknown>
Sun, 19 Sep 2010 15:22:01 +0000 (15:22 +0000)
committersimonpj@microsoft.com <unknown>
Sun, 19 Sep 2010 15:22:01 +0000 (15:22 +0000)
compiler/typecheck/TcGenDeriv.lhs

index 4e95ad3..6e5aedc 100644 (file)
@@ -1668,7 +1668,7 @@ genAuxBind loc (GenCon2Tag tycon)
     rdr_name = con2tag_RDR tycon
 
     sig_ty = HsCoreTy $ 
     rdr_name = con2tag_RDR tycon
 
     sig_ty = HsCoreTy $ 
-             mkForAllTys (tyConTyVars tycon) $
+             mkSigmaTy (tyConTyVars tycon) (tyConStupidTheta tycon) $
              mkParentType tycon `mkFunTy` intPrimTy
 
     lots_of_constructors = tyConFamilySize tycon > 8
              mkParentType tycon `mkFunTy` intPrimTy
 
     lots_of_constructors = tyConFamilySize tycon > 8