summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ghc/compiler/compMan/CmLink.lhs10
-rw-r--r--ghc/compiler/main/Interpreter.hs6
-rw-r--r--ghc/compiler/utils/Outputable.lhs7
3 files changed, 18 insertions, 5 deletions
diff --git a/ghc/compiler/compMan/CmLink.lhs b/ghc/compiler/compMan/CmLink.lhs
index ba768882ce..1f3005aec9 100644
--- a/ghc/compiler/compMan/CmLink.lhs
+++ b/ghc/compiler/compMan/CmLink.lhs
@@ -27,6 +27,8 @@ import Panic ( panic )
\begin{code}
data PersistentLinkerState
= PersistentLinkerState {
+
+#ifdef GHCI
-- Current global mapping from RdrNames to closure addresses
closure_env :: ClosureEnv,
@@ -39,6 +41,10 @@ data PersistentLinkerState
-- notionally here, but really lives in the C part of the linker:
-- object_symtab :: FiniteMap String Addr
+#else
+ dummy :: () -- sigh, can't have an empty record
+#endif
+
}
data LinkResult
@@ -76,8 +82,12 @@ instance Outputable Linkable where
ppr (LP package_nm) = text "LinkableP" <+> ptext package_nm
emptyPLS :: IO PersistentLinkerState
+#ifdef GHCI
emptyPLS = return (PersistentLinkerState { closure_env = emptyFM,
itbl_env = emptyFM })
+#else
+emptyPLS = return (PersistentLinkerState {})
+#endif
\end{code}
\begin{code}
diff --git a/ghc/compiler/main/Interpreter.hs b/ghc/compiler/main/Interpreter.hs
index 6496eba773..9a5c242dc6 100644
--- a/ghc/compiler/main/Interpreter.hs
+++ b/ghc/compiler/main/Interpreter.hs
@@ -1,5 +1,5 @@
-----------------------------------------------------------------------------
--- $Id: Interpreter.hs,v 1.1 2000/11/07 16:03:38 simonmar Exp $
+-- $Id: Interpreter.hs,v 1.2 2000/11/08 13:51:58 simonmar Exp $
--
-- Interpreter subsystem wrapper
--
@@ -17,7 +17,7 @@ module Interpreter (
linkIModules,
stgToInterpSyn,
HValue,
- UnlinkedIBinds,
+ UnlinkedIBind,
loadObjs, resolveObjs,
#endif
) where
@@ -32,7 +32,7 @@ type ItblEnv = ()
linkIModules = error "linkIModules"
stgToInterpSyn = error "linkIModules"
type HValue = ()
-type UnlinkedIBinds = ()
+type UnlinkedIBind = ()
loadObjs = error "loadObjs"
resolveObjs = error "loadObjs"
#endif
diff --git a/ghc/compiler/utils/Outputable.lhs b/ghc/compiler/utils/Outputable.lhs
index 9cb9fa8edc..2ec5c52289 100644
--- a/ghc/compiler/utils/Outputable.lhs
+++ b/ghc/compiler/utils/Outputable.lhs
@@ -287,6 +287,9 @@ instance Outputable Bool where
instance Outputable Int where
ppr n = int n
+instance Outputable () where
+ ppr _ = text "()"
+
instance (Outputable a) => Outputable [a] where
ppr xs = brackets (fsep (punctuate comma (map ppr xs)))
@@ -294,8 +297,8 @@ instance (Outputable a, Outputable b) => Outputable (a, b) where
ppr (x,y) = parens (sep [ppr x <> comma, ppr y])
instance Outputable a => Outputable (Maybe a) where
- ppr Nothing = text "Nothing"
- ppr (Just x) = text "Just" <+> ppr x
+ ppr Nothing = ptext SLIT("Nothing")
+ ppr (Just x) = ptext SLIT("Just") <+> ppr x
-- ToDo: may not be used
instance (Outputable a, Outputable b, Outputable c) => Outputable (a, b, c) where