[commit: ghc] ghc-validate: Stop the pipeline when it doesn't need to be run. (d77c404)

git at git.haskell.org git at git.haskell.org
Thu Oct 22 04:18:35 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-validate
Link       : http://ghc.haskell.org/trac/ghc/changeset/d77c4049607ab310076a271eb8d7aab42cbb87de/ghc

>---------------------------------------------------------------

commit d77c4049607ab310076a271eb8d7aab42cbb87de
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Mon Oct 19 23:53:33 2015 -0700

    Stop the pipeline when it doesn't need to be run.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>


>---------------------------------------------------------------

d77c4049607ab310076a271eb8d7aab42cbb87de
 compiler/main/DriverPipeline.hs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index e83f7d6..373afba 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1023,7 +1023,7 @@ runPhase (HscOut src_flavour mod_name result) _ dflags = do
 
         case result of
             HscNotGeneratingCode ->
-                return (RealPhase next_phase,
+                return (RealPhase StopLn,
                         panic "No output filename from Hsc when no-code")
             HscUpToDate ->
                 do liftIO $ touchObjectFile dflags o_file
@@ -1035,7 +1035,7 @@ runPhase (HscOut src_flavour mod_name result) _ dflags = do
                 do -- In the case of hs-boot files, generate a dummy .o-boot
                    -- stamp file for the benefit of Make
                    liftIO $ touchObjectFile dflags o_file
-                   return (RealPhase next_phase, o_file)
+                   return (RealPhase StopLn, o_file)
             HscUpdateBootMerge ->
                 do -- We need to create a REAL but empty .o file
                    -- because we are going to attempt to put it in a library
@@ -1043,7 +1043,7 @@ runPhase (HscOut src_flavour mod_name result) _ dflags = do
                    let input_fn = expectJust "runPhase" (ml_hs_file location)
                        basename = dropExtension input_fn
                    liftIO $ compileEmptyStub dflags hsc_env' basename location
-                   return (RealPhase next_phase, o_file)
+                   return (RealPhase StopLn, o_file)
             HscRecomp cgguts mod_summary
               -> do output_fn <- phaseOutputFilename next_phase
 



More information about the ghc-commits mailing list