X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FHscMain.lhs;h=d5d920d9b274092af2fd9cb8ce9d75d30bf339a6;hb=dda45b7ae83033cf99630435c13054f3f6ac67d2;hp=986d2ce6d904238d21be30a13c2281bfe3c60fda;hpb=2c1ea2cedb1a8034b0828e24b554a35f56bb8924;p=ghc-hetmet.git diff --git a/compiler/main/HscMain.lhs b/compiler/main/HscMain.lhs index 986d2ce..d5d920d 100644 --- a/compiler/main/HscMain.lhs +++ b/compiler/main/HscMain.lhs @@ -217,6 +217,9 @@ data CompState get :: Comp CompState get = Comp $ \s -> return (s,s) +modify :: (CompState -> CompState) -> Comp () +modify f = Comp $ \s -> return ((), f s) + gets :: (CompState -> a) -> Comp a gets getter = do st <- get return (getter st) @@ -253,6 +256,10 @@ hscMkCompiler norecomp messenger frontend backend <- {-# SCC "checkOldIface" #-} liftIO $ checkOldIface hsc_env mod_summary source_unchanged mbOldIface + -- save the interface that comes back from checkOldIface. + -- In one-shot mode we don't have the old iface until this + -- point, when checkOldIface reads it from the disk. + modify (\s -> s{ compOldIface = mbCheckedIface }) case mbCheckedIface of Just iface | not recomp_reqd -> do messenger mbModIndex False @@ -390,9 +397,9 @@ batchMsg mb_mod_index recomp liftIO $ do if recomp then showMsg "Compiling " - else showMsg "Skipping " - - + else if verbosity (hsc_dflags hsc_env) >= 2 + then showMsg "Skipping " + else return () -------------------------------------------------------------- -- FrontEnds