X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fprelude%2FPrelInfo.lhs;fp=ghc%2Fcompiler%2Fprelude%2FPrelInfo.lhs;h=f1a64ede9be86713ba235d486d73200462aede2c;hb=47eef4b5780f0a5b5a37847097842daebd0f9285;hp=e62d66382731b4b2bc1b990efa571fd43dbc8046;hpb=cd241c73f2b03a48d905e0db50c796eb0de45dec;p=ghc-hetmet.git diff --git a/ghc/compiler/prelude/PrelInfo.lhs b/ghc/compiler/prelude/PrelInfo.lhs index e62d663..f1a64ed 100644 --- a/ghc/compiler/prelude/PrelInfo.lhs +++ b/ghc/compiler/prelude/PrelInfo.lhs @@ -40,7 +40,7 @@ import TysWiredIn ( wiredInTyCons ) import HscTypes ( TyThing(..), TypeEnv, mkTypeEnv ) -- others: -import TyCon ( tyConDataConsIfAvailable, TyCon ) +import TyCon ( tyConDataConsIfAvailable, tyConGenIds, TyCon ) import Class ( Class, classKey ) import Type ( funTyCon ) import Util ( isIn ) @@ -70,9 +70,13 @@ wiredInThings ] wiredInTyConThings :: TyCon -> [TyThing] +-- This is a bit of a cheat (c.f. TcTyDecls.mkImplicitDataBinds +-- It assumes that wired in tycons have no record selectors wiredInTyConThings tc - = ATyCon tc : [ AnId n | dc <- tyConDataConsIfAvailable tc, - n <- [dataConId dc, dataConWrapId dc] ] + = [ATyCon tc] + ++ [ AnId i | i <- tyConGenIds tc ] + ++ [ AnId n | dc <- tyConDataConsIfAvailable tc, + n <- [dataConId dc, dataConWrapId dc] ] -- Synonyms return empty list of constructors wiredInThingEnv :: TypeEnv