Remove (most of) the FiniteMap wrapper
[ghc-hetmet.git] / compiler / ghci / Linker.lhs
index 45cbdc0..66a4576 100644 (file)
@@ -51,7 +51,6 @@ import ErrUtils
 import SrcLoc
 import qualified Maybes
 import UniqSet
-import FiniteMap
 import Constants
 import FastString
 import Config          ( cProjectVersion )
@@ -62,6 +61,7 @@ import Control.Monad
 import Data.Char
 import Data.IORef
 import Data.List
+import qualified Data.Map as Map
 import Foreign
 import Control.Concurrent.MVar
 
@@ -633,6 +633,7 @@ getLinkDeps hsc_env hpt pls maybe_normal_osuf span mods
             text "module" <+> ppr mod <+> 
             text "cannot be linked; it is only available as a boot module")))
 
+    no_obj :: Outputable a => a -> IO b
     no_obj mod = dieWith span $
                     ptext (sLit "cannot find object file for module ") <> 
                        quotes (ppr mod) $$
@@ -657,7 +658,7 @@ getLinkDeps hsc_env hpt pls maybe_normal_osuf span mods
                -- ...and then find the linkable for it
               mb_lnk <- findObjectLinkableMaybe mod loc ;
               case mb_lnk of {
-                 Nothing -> no_obj mod ;
+                 Nothing  -> no_obj mod ;
                  Just lnk -> adjust_linkable lnk
              }}
 
@@ -1000,7 +1001,7 @@ linkPackages' dflags new_pks pls = do
        | Just pkg_cfg <- lookupPackage pkg_map new_pkg
        = do {  -- Link dependents first
                pkgs' <- link pkgs [ Maybes.expectJust "link_one" $
-                                    lookupFM ipid_map ipid
+                                    Map.lookup ipid ipid_map
                                   | ipid <- depends pkg_cfg ]
                -- Now link the package itself
             ; linkPackage dflags pkg_cfg