summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsewardj <unknown>2000-10-13 10:26:38 +0000
committersewardj <unknown>2000-10-13 10:26:38 +0000
commit764d826ef78e39ccf7474fa0d9703ca9dbc966a0 (patch)
treec2672cfff80cd378dd29197e33d79cba7c29c739
parent13123a9a94d65fac88dd6ce2094f24b5430eeaf2 (diff)
downloadhaskell-764d826ef78e39ccf7474fa0d9703ca9dbc966a0.tar.gz
[project @ 2000-10-13 10:26:38 by sewardj]
Changes to make PrelInfo compile.
-rw-r--r--ghc/compiler/main/HscTypes.lhs2
-rw-r--r--ghc/compiler/prelude/PrelInfo.lhs16
2 files changed, 10 insertions, 8 deletions
diff --git a/ghc/compiler/main/HscTypes.lhs b/ghc/compiler/main/HscTypes.lhs
index 97833dc2a9..74b55e7347 100644
--- a/ghc/compiler/main/HscTypes.lhs
+++ b/ghc/compiler/main/HscTypes.lhs
@@ -4,7 +4,7 @@
\section[HscTypes]{Types for the per-module compiler}
\begin{code}
-module HscTypes ( )
+module HscTypes ( TyThing(..) )
where
#include "HsVersions.h"
diff --git a/ghc/compiler/prelude/PrelInfo.lhs b/ghc/compiler/prelude/PrelInfo.lhs
index fb4bdf8e59..88bf2f35f7 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}