projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1a9245c
)
Wibble to allow phantom types in Enum
author
simonpj@microsoft.com
<unknown>
Wed, 25 Aug 2010 11:27:11 +0000
(11:27 +0000)
committer
simonpj@microsoft.com
<unknown>
Wed, 25 Aug 2010 11:27:11 +0000
(11:27 +0000)
compiler/typecheck/TcGenDeriv.lhs
patch
|
blob
|
history
diff --git
a/compiler/typecheck/TcGenDeriv.lhs
b/compiler/typecheck/TcGenDeriv.lhs
index
525f095
..
d15bb05
100644
(file)
--- 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)
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
[([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
rdr_name = tag2con_RDR tycon