diff --git a/ghc/compiler/compMan/CmLink.lhs b/ghc/compiler/compMan/CmLink.lhs index ba768882ce25c89a39145a5650a4b404642ce2be..1f3005aec917ffa69587f7f3705646c23eaa6128 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 6496eba773c3371d4f1af8d8554325dbb8fd52e6..9a5c242dc64aba8b5b7423d0358af3a8823c3e52 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 9cb9fa8edcfa2e0f3d2faefe128a840c9ead3bb5..2ec5c52289817d7f9e685c415e0dfe346228d869 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