projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2005-07-19 16:44:50 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
types
/
Generics.lhs
diff --git
a/ghc/compiler/types/Generics.lhs
b/ghc/compiler/types/Generics.lhs
index
aa7ccf2
..
d6a4278
100644
(file)
--- a/
ghc/compiler/types/Generics.lhs
+++ b/
ghc/compiler/types/Generics.lhs
@@
-256,12
+256,14
@@
type FromAlt = (LPat RdrName, LHsExpr RdrName)
mkTyConGenericBinds :: TyCon -> LHsBinds RdrName
mkTyConGenericBinds tycon
= unitBag (L loc (FunBind (L loc from_RDR) False {- Not infix -}
mkTyConGenericBinds :: TyCon -> LHsBinds RdrName
mkTyConGenericBinds tycon
= unitBag (L loc (FunBind (L loc from_RDR) False {- Not infix -}
- (mkMatchGroup [mkSimpleHsAlt pat rhs | (pat,rhs) <- from_alts])))
+ from_matches placeHolderNames))
`unionBags`
unitBag (L loc (FunBind (L loc to_RDR) False
`unionBags`
unitBag (L loc (FunBind (L loc to_RDR) False
- (mkMatchGroup [mkSimpleHsAlt to_pat to_body])))
+ to_matches placeHolderNames))
where
where
+ from_matches = mkMatchGroup [mkSimpleHsAlt pat rhs | (pat,rhs) <- from_alts]
+ to_matches = mkMatchGroup [mkSimpleHsAlt to_pat to_body]
loc = srcLocSpan (getSrcLoc tycon)
datacons = tyConDataCons tycon
(from_RDR, to_RDR) = mkGenericNames tycon
loc = srcLocSpan (getSrcLoc tycon)
datacons = tyConDataCons tycon
(from_RDR, to_RDR) = mkGenericNames tycon