From 9c1c10c2783701db404035994b84af310021fccf Mon Sep 17 00:00:00 2001 From: simonmar <unknown> Date: Wed, 8 Nov 2000 13:51:58 +0000 Subject: [PATCH] [project @ 2000-11-08 13:51:58 by simonmar] Fixes for compiling w/ 4.08.1 --- ghc/compiler/compMan/CmLink.lhs | 10 ++++++++++ ghc/compiler/main/Interpreter.hs | 6 +++--- ghc/compiler/utils/Outputable.lhs | 7 +++++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ghc/compiler/compMan/CmLink.lhs b/ghc/compiler/compMan/CmLink.lhs index ba768882ce25..1f3005aec917 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 6496eba773c3..9a5c242dc64a 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 9cb9fa8edcfa..2ec5c5228981 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 -- GitLab