\begin{code}
data PersistentLinkerState
= PersistentLinkerState {
+
+#ifdef GHCI
-- Current global mapping from RdrNames to closure addresses
closure_env :: ClosureEnv,
-- 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
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}
-----------------------------------------------------------------------------
--- $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
--
linkIModules,
stgToInterpSyn,
HValue,
- UnlinkedIBinds,
+ UnlinkedIBind,
loadObjs, resolveObjs,
#endif
) where
linkIModules = error "linkIModules"
stgToInterpSyn = error "linkIModules"
type HValue = ()
-type UnlinkedIBinds = ()
+type UnlinkedIBind = ()
loadObjs = error "loadObjs"
resolveObjs = error "loadObjs"
#endif
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)))
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