X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FHscMain.lhs;h=b1832504f9342201146ec3bc86a44a62497d8a3f;hb=8b6c1605e75a2482892995c6d0529911796e89dd;hp=d5ad093bc9d3ef10f5cfa92ebd48e166e65a68d0;hpb=ce426964baf58f76ad4681d8a26f671c10ad4f7e;p=ghc-hetmet.git diff --git a/compiler/main/HscMain.lhs b/compiler/main/HscMain.lhs index d5ad093..b183250 100644 --- a/compiler/main/HscMain.lhs +++ b/compiler/main/HscMain.lhs @@ -109,7 +109,7 @@ import HscStats ( ppSourceStats ) import HscTypes import MkExternalCore ( emitExternalCore ) import FastString -import LazyUniqFM ( emptyUFM ) +import UniqFM ( emptyUFM ) import UniqSupply ( initUs_ ) import Bag ( unitBag ) import Exception @@ -435,7 +435,12 @@ hscOneShotCompiler = , hscRecompile = genericHscRecompile hscOneShotCompiler - , hscBackend = genericHscBackend hscOneShotCompiler + , hscBackend = \ tc_result mod_summary mb_old_hash -> do + hsc_env <- getSession + case hscTarget (hsc_dflags hsc_env) of + HscNothing -> return (HscRecomp False ()) + _otherw -> genericHscBackend hscOneShotCompiler + tc_result mod_summary mb_old_hash , hscGenBootOutput = \tc_result mod_summary mb_old_iface -> do (iface, changed, _) <- hscSimpleIface tc_result mb_old_iface @@ -536,13 +541,7 @@ hscNothingCompiler = details <- genModDetails iface return (HscNoRecomp, iface, details) - , hscRecompile = \mod_summary mb_old_hash -> - case ms_hsc_src mod_summary of - ExtCoreFile -> - panic "hscCompileNothing: cannot do external core" - _otherwise -> do - tc_result <- hscFileFrontEnd mod_summary - hscBackend hscNothingCompiler tc_result mod_summary mb_old_hash + , hscRecompile = genericHscRecompile hscNothingCompiler , hscBackend = \tc_result _mod_summary mb_old_iface -> do (iface, _changed, details) <- hscSimpleIface tc_result mb_old_iface