[project @ 2000-11-08 13:51:58 by simonmar]
authorsimonmar <unknown>
Wed, 8 Nov 2000 13:51:58 +0000 (13:51 +0000)
committersimonmar <unknown>
Wed, 8 Nov 2000 13:51:58 +0000 (13:51 +0000)
Fixes for compiling w/ 4.08.1

ghc/compiler/compMan/CmLink.lhs
ghc/compiler/main/Interpreter.hs
ghc/compiler/utils/Outputable.lhs

index ba76888..1f3005a 100644 (file)
@@ -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}
index 6496eba..9a5c242 100644 (file)
@@ -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
index 9cb9fa8..2ec5c52 100644 (file)
@@ -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