X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FLinker.lhs;h=976fe92a888231a19a9d2aadbadd2343048a5211;hb=bdee32f9a91a9bb2403a469494674c909d1bdb76;hp=26f40ebbe4e13bea04ed7d03cef4a999fc7d6fa3;hpb=61d2625ae2e6a4cdae2ffc92df828905e81c24cc;p=ghc-hetmet.git diff --git a/compiler/ghci/Linker.lhs b/compiler/ghci/Linker.lhs index 26f40eb..976fe92 100644 --- a/compiler/ghci/Linker.lhs +++ b/compiler/ghci/Linker.lhs @@ -44,8 +44,8 @@ import BasicTypes ( SuccessFlag(..), succeeded, failed ) import Outputable import PackageConfig ( rtsPackageId ) import Panic ( GhcException(..) ) -import Util ( zipLazy, global, joinFileExt, joinFileName, suffixOf, - replaceFilenameSuffix ) +import Util ( zipLazy, global, joinFileExt, joinFileName, + replaceFilenameSuffix ) import StaticFlags ( v_Ld_inputs, v_Build_tag ) import ErrUtils ( debugTraceMsg, mkLocMessage ) import DriverPhases ( phaseInputExt, Phase(..) ) @@ -53,7 +53,7 @@ import SrcLoc ( SrcSpan ) -- Standard libraries import Control.Monad ( when, filterM, foldM ) - + import Data.IORef ( IORef, readIORef, writeIORef, modifyIORef ) import Data.List ( partition, nub ) @@ -196,7 +196,6 @@ We initialise the dynamic linker by a) calling the C initialisation procedure b) Loading any packages specified on the command line, - now held in v_ExplicitPackages c) Loading any packages specified on the command line, now held in the -l options in v_Opt_l @@ -225,7 +224,7 @@ reallyInitDynLinker dflags ; initObjLinker -- (b) Load packages from the command-line - ; linkPackages dflags (explicitPackages (pkgState dflags)) + ; linkPackages dflags (preloadPackages (pkgState dflags)) -- (c) Link libraries from the command-line ; let optl = getOpts dflags opt_l @@ -468,8 +467,8 @@ getLinkDeps hsc_env hpt pit maybe_normal_osuf span mods case mb_stuff of Found loc mod -> found loc mod _ -> no_obj mod_name - - found loc mod = do { + where + found loc mod = do { -- ...and then find the linkable for it mb_lnk <- findObjectLinkableMaybe mod loc ; case mb_lnk of {