X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fprelude%2FPrelInfo.lhs;h=88bf2f35f707b39b827fc0f3141de3de9896f156;hb=764d826ef78e39ccf7474fa0d9703ca9dbc966a0;hp=fb4bdf8e591fcc332eb4e0c9bfddab41775cb352;hpb=13123a9a94d65fac88dd6ce2094f24b5430eeaf2;p=ghc-hetmet.git diff --git a/ghc/compiler/prelude/PrelInfo.lhs b/ghc/compiler/prelude/PrelInfo.lhs index fb4bdf8..88bf2f3 100644 --- a/ghc/compiler/prelude/PrelInfo.lhs +++ b/ghc/compiler/prelude/PrelInfo.lhs @@ -49,6 +49,7 @@ import Type ( funTyCon ) import Bag import BasicTypes ( Boxity(..) ) import Util ( isIn ) +import Outputable ( ppr, pprPanic ) \end{code} %************************************************************************ @@ -75,13 +76,14 @@ wiredInThings ] wiredInNames :: [Name] -wiredInNames = [n | thing <- wiredInThings, n <- tyThingNames] - -tyThingNames :: TyCon -> [Name] -tyThingNames (AnClass cl) = pprPanic "tyThingNames" (ppr cl) -- Not used -tyThingNames (AnId id) = [getName id] -tyThingNames (ATyCon tc) = getName tycon : [ getName n | dc <- tyConDataConsIfAvailable tycon, - n <- [dataConId dc, dataConWrapId dc] ] +wiredInNames = [n | thing <- wiredInThings, n <- tyThingNames thing] + +tyThingNames :: TyThing -> [Name] +tyThingNames (AClass cl) = pprPanic "tyThingNames" (ppr cl) -- Not used +tyThingNames (AnId id) = [getName id] +tyThingNames (ATyCon tc) + = getName tc : [ getName n | dc <- tyConDataConsIfAvailable tc, + n <- [dataConId dc, dataConWrapId dc] ] -- Synonyms return empty list of constructors \end{code}