X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypes%2FTyCon.lhs;h=3c7206ba2ef91480a2303fc753008f1cdc6c9cbd;hb=113397e427d102afed56cc0625f3eb096465ad24;hp=78cf5be1bb2e7d3190117a84272fae1a84314e60;hpb=2b65c00d358287b432c8fb267a5cb3a754580d45;p=ghc-hetmet.git diff --git a/ghc/compiler/types/TyCon.lhs b/ghc/compiler/types/TyCon.lhs index 78cf5be..3c7206b 100644 --- a/ghc/compiler/types/TyCon.lhs +++ b/ghc/compiler/types/TyCon.lhs @@ -33,7 +33,7 @@ module TyCon( tyConUnique, tyConTyVars, tyConArgVrcs, - algTcRhs, tyConDataCons, tyConDataCons_maybe, tyConFamilySize, + algTyConRhs, tyConDataCons, tyConDataCons_maybe, tyConFamilySize, tyConFields, tyConSelIds, tyConStupidTheta, tyConArity, @@ -490,6 +490,11 @@ tyConFields other_tycon = [] 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}