PersistentLinkerState{-abstractly!-}, emptyPLS )
where
-import StgInterp ( linkIModules, ClosureEnv, ItblEnv )
-import Linker ( loadObj, resolveObjs )
+
+import Interpreter
import CmStaticInfo ( PackageConfigInfo )
import Module ( ModuleName, PackageName )
-import InterpSyn ( UnlinkedIBind, HValue, binder )
-import Module ( Module )
import Outputable ( SDoc )
-import FiniteMap ( emptyFM )
import Digraph ( SCC(..), flattenSCC )
import Outputable
import Panic ( panic )
\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 (DotO path) = text "DotO" <+> text path
ppr (DotA path) = text "DotA" <+> text path
ppr (DotDLL path) = text "DotDLL" <+> text path
- ppr (Trees binds _) = text "Trees" <+> ppr (map binder binds)
+ ppr (Trees binds _) = text "Trees" <+> ppr binds
isObject (DotO _) = True
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}