projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2004-10-08 11:36:26 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
types
/
TyCon.lhs
diff --git
a/ghc/compiler/types/TyCon.lhs
b/ghc/compiler/types/TyCon.lhs
index
78cf5be
..
3c7206b
100644
(file)
--- a/
ghc/compiler/types/TyCon.lhs
+++ b/
ghc/compiler/types/TyCon.lhs
@@
-33,7
+33,7
@@
module TyCon(
tyConUnique,
tyConTyVars,
tyConArgVrcs,
tyConUnique,
tyConTyVars,
tyConArgVrcs,
- algTcRhs, tyConDataCons, tyConDataCons_maybe, tyConFamilySize,
+ algTyConRhs, tyConDataCons, tyConDataCons_maybe, tyConFamilySize,
tyConFields, tyConSelIds,
tyConStupidTheta,
tyConArity,
tyConFields, tyConSelIds,
tyConStupidTheta,
tyConArity,
@@
-490,6
+490,11
@@
tyConFields other_tycon = []
tyConSelIds :: TyCon -> [Id]
tyConSelIds tc = [id | (_,_,id) <- tyConFields tc]
tyConSelIds :: TyCon -> [Id]
tyConSelIds tc = [id | (_,_,id) <- tyConFields tc]
+
+algTyConRhs :: TyCon -> AlgTyConRhs
+algTyConRhs (AlgTyCon {algTcRhs = rhs}) = rhs
+algTyConRhs (TupleTyCon {dataCon = con}) = DataTyCon (Just []) [con] False
+algTyConRhs other = pprPanic "algTyConRhs" (ppr other)
\end{code}
\begin{code}
\end{code}
\begin{code}