Commit 764d826e authored by sewardj's avatar sewardj
Browse files

[project @ 2000-10-13 10:26:38 by sewardj]

Changes to make PrelInfo compile.
parent 13123a9a
......@@ -4,7 +4,7 @@
\section[HscTypes]{Types for the per-module compiler}
\begin{code}
module HscTypes ( )
module HscTypes ( TyThing(..) )
where
#include "HsVersions.h"
......
......@@ -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}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment