[project @ 2001-02-12 11:38:49 by sewardj]
authorsewardj <unknown>
Mon, 12 Feb 2001 11:38:49 +0000 (11:38 +0000)
committersewardj <unknown>
Mon, 12 Feb 2001 11:38:49 +0000 (11:38 +0000)
The linker is initialised from the Haskell world now.

ghc/compiler/ghci/InteractiveUI.hs
ghc/compiler/ghci/Linker.lhs

index 6416e23..3db4098 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: InteractiveUI.hs,v 1.41 2001/02/11 14:33:27 simonmar Exp $
+-- $Id: InteractiveUI.hs,v 1.42 2001/02/12 11:38:49 sewardj Exp $
 --
 -- GHC Interactive User Interface
 --
@@ -111,6 +111,7 @@ interactiveUI cmstate mod = do
 
    -- link in the available packages
    pkgs <- getPackageInfo
+   initLinker
    linkPackages (reverse pkgs)
 
    (cmstate, ok, mods) <-
index 9404d42..72d6b89 100644 (file)
@@ -6,6 +6,7 @@
 \begin{code}
 {-# OPTIONS -#include "Linker.h" #-}
 module Linker ( 
+   initLinker,  -- :: IO ()
    loadObj,      -- :: String -> IO ()
    unloadObj,    -- :: String -> IO ()
    lookupSymbol, -- :: String -> IO (Maybe (Ptr a))
@@ -59,4 +60,7 @@ foreign import "unloadObj" unsafe
 
 foreign import "resolveObjs" unsafe
    c_resolveObjs :: IO Int
+
+foreign import "initLinker" unsafe
+   initLinker :: IO ()
 \end{code}