summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
13123a9)
Changes to make PrelInfo compile.
\section[HscTypes]{Types for the per-module compiler}
\begin{code}
\section[HscTypes]{Types for the per-module compiler}
\begin{code}
+module HscTypes ( TyThing(..) )
where
#include "HsVersions.h"
where
#include "HsVersions.h"
import Bag
import BasicTypes ( Boxity(..) )
import Util ( isIn )
import Bag
import BasicTypes ( Boxity(..) )
import Util ( isIn )
+import Outputable ( ppr, pprPanic )
\end{code}
%************************************************************************
\end{code}
%************************************************************************
-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}
-- Synonyms return empty list of constructors
\end{code}