projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the distinction between data and newtype families
[ghc-hetmet.git]
/
compiler
/
typecheck
/
TcDeriv.lhs
diff --git
a/compiler/typecheck/TcDeriv.lhs
b/compiler/typecheck/TcDeriv.lhs
index
98d7fcf
..
1a9a881
100644
(file)
--- 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
; 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
mkDataTypeEqn orig gla_exts full_tvs cls cls_tys
tycon full_tc_args rep_tc rep_tc_args
else