X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fmain%2FDriverPipeline.hs;h=c0ea4fc58688e9154c316772718c69dfa758c705;hb=f8c52d7fde2d7408b4f734251c373f8d3e2c558e;hp=ceb0b3be50e7ea0d84b4539b18a8d8a96fb06357;hpb=7fc749a43b4b6b85d234fa95d4928648259584f4;p=ghc-hetmet.git diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index ceb0b3b..c0ea4fc 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -163,7 +163,8 @@ compile hsc_env mod_summary maybe_old_linkable old_iface mod_index nmods = do return (CompOK details iface maybe_old_linkable) handleBatch (HscRecomp hasStub, iface, details) | isHsBoot src_flavour - = do SysTools.touch dflags' "Touching object file" + = do when (isObjectTarget hsc_lang) $ -- interpreted reaches here too + SysTools.touch dflags' "Touching object file" object_filename return (CompOK details iface Nothing) | otherwise @@ -188,9 +189,9 @@ compile hsc_env mod_summary maybe_old_linkable old_iface mod_index nmods = do handleInterpreted (InteractiveNoRecomp, iface, details) = ASSERT (isJust maybe_old_linkable) return (CompOK details iface maybe_old_linkable) - handleInterpreted (InteractiveRecomp hasStub comp_bc, iface, details) + handleInterpreted (InteractiveRecomp hasStub comp_bc modBreaks, iface, details) = do stub_unlinked <- getStubLinkable hasStub - let hs_unlinked = [BCOs comp_bc] + let hs_unlinked = [BCOs comp_bc modBreaks] unlinked_time = ms_hs_date mod_summary -- Why do we use the timestamp of the source file here, -- rather than the current time? This works better in @@ -211,13 +212,11 @@ compile hsc_env mod_summary maybe_old_linkable old_iface mod_index nmods = do Just result -> handle result -- run the compiler case hsc_lang of - HscInterpreted | not (isHsBoot src_flavour) -- We can't compile boot files to - -- bytecode so don't even try. - -> runCompiler hscCompileInteractive handleInterpreted - HscNothing - -> runCompiler hscCompileNothing handleBatch - _other - -> runCompiler hscCompileBatch handleBatch + HscInterpreted + | isHsBoot src_flavour -> runCompiler hscCompileNothing handleBatch + | otherwise -> runCompiler hscCompileInteractive handleInterpreted + HscNothing -> runCompiler hscCompileNothing handleBatch + _other -> runCompiler hscCompileBatch handleBatch ----------------------------------------------------------------------------- -- stub .h and .c files (for foreign export support)