Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
369d62ba
Commit
369d62ba
authored
Aug 25, 2010
by
simonpj@microsoft.com
Browse files
Wibble to allow phantom types in Enum
parent
1a9245ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/TcGenDeriv.lhs
View file @
369d62ba
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment