[project @ 2005-04-12 16:40:16 by krasimir]
authorkrasimir <unknown>
Tue, 12 Apr 2005 16:40:16 +0000 (16:40 +0000)
committerkrasimir <unknown>
Tue, 12 Apr 2005 16:40:16 +0000 (16:40 +0000)
initDynLinker is invoked from unload now. This makes safe to call it even when
then linker is still not initialized.

ghc/compiler/ghci/Linker.lhs

index 0a18638..c971f91 100644 (file)
@@ -616,6 +616,9 @@ unload :: DynFlags -> [Linkable] -> IO ()
 
 unload dflags linkables
   = block $ do -- block, so we're safe from Ctrl-C in here
+  
+       -- Initialise the linker (if it's not been done already)
+       initDynLinker dflags
 
        pls     <- readIORef v_PersistentLinkerState
        new_pls <- unload_wkr dflags linkables pls