- = do {
- when (verbosity dflags >= 1) $
- hPutStrLn stderr ("Skipping " ++
- showModMsg have_object mod location);
-
- -- CLOSURE
- (pcs_cl, closure_errs, cl_hs_decls)
- <- closeIfaceDecls dflags hit hst pcs_ch old_iface ;
- if closure_errs then
- return (HscFail pcs_cl)
- else do {
-
- -- TYPECHECK
- maybe_tc_result
- <- typecheckIface dflags pcs_cl hst old_iface cl_hs_decls;
-
- case maybe_tc_result of {
- Nothing -> return (HscFail pcs_cl);
- Just (pcs_tc, new_details) ->
-
- return (HscNoRecomp pcs_tc new_details old_iface)
- }}}
-
-hscRecomp ghci_mode dflags have_object
- mod location maybe_checked_iface hst hit pcs_ch
- = do {
- -- what target are we shooting for?
- ; let toInterp = dopt_HscLang dflags == HscInterpreted
- ; let toNothing = dopt_HscLang dflags == HscNothing
- ; let toCore = isJust (ml_hs_file location) &&
- isExtCore_file (fromJust (ml_hs_file location))
-
- ; when (ghci_mode /= OneShot && verbosity dflags >= 1) $
- hPutStrLn stderr ("Compiling " ++
- showModMsg (not toInterp) mod location);
-
- ; front_res <-
- (if toCore then hscCoreFrontEnd else hscFrontEnd)
- ghci_mode dflags location hst hit pcs_ch
- ; case front_res of
- Left flure -> return flure;
- Right (this_mod, rdr_module,
- dont_discard, new_iface,
- pcs_tc, ds_details, foreign_stuff) -> do {
-
- let {
- imported_module_names :: [ModuleName];
- imported_module_names =
- filter (/= gHC_PRIM_Name) $
- map ideclName (hsModuleImports rdr_module);
-
- imported_modules :: [(Module,Version)];
- imported_modules =
- map (getModuleAndVersion hit (pcs_PIT pcs_tc))
- imported_module_names;
- }
-
- -- force this out now, so we don't keep a hold of rdr_module or pcs_tc
- ; seqList imported_modules (return ())
-
- -- this module's version
- ; version <- return $! vers_module (mi_version new_iface)