[commit: ghc] master: Don't redundantly set hscTarget to the same value it already was (253b0f2)

Ian Lynagh igloo at earth.li
Sat Mar 2 19:16:57 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/253b0f2e0464b6c6bd0292319daa976148d43a80

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

commit 253b0f2e0464b6c6bd0292319daa976148d43a80
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sat Mar 2 17:39:43 2013 +0000

    Don't redundantly set hscTarget to the same value it already was

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

 compiler/main/DriverPipeline.hs | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 0d86dcb..577cb61 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -149,9 +149,8 @@ compile' (nothingCompiler, interactiveCompiler, batchCompiler)
    output_fn <- getOutputFilename next_phase
                         Temporary basename dflags next_phase (Just location)
 
-   let dflags' = dflags { hscTarget = hsc_lang,
-                                hscOutName = output_fn,
-                                extCoreName = basename ++ ".hcr" }
+   let dflags' = dflags { hscOutName = output_fn,
+                          extCoreName = basename ++ ".hcr" }
    let hsc_env' = hsc_env { hsc_dflags = dflags' }
 
    -- -fforce-recomp should also work with --make
@@ -980,8 +979,7 @@ runPhase (Hsc src_flavour) input_fn dflags0
         let next_phase = hscPostBackendPhase dflags src_flavour hsc_lang
         output_fn  <- phaseOutputFilename next_phase
 
-        let dflags' = dflags { hscTarget = hsc_lang,
-                               hscOutName = output_fn,
+        let dflags' = dflags { hscOutName = output_fn,
                                extCoreName = basename ++ ".hcr" }
 
         setDynFlags dflags'
@@ -1050,8 +1048,7 @@ runPhase Cmm input_fn dflags
 
         output_fn <- phaseOutputFilename next_phase
 
-        let dflags' = dflags { hscTarget = hsc_lang,
-                               hscOutName = output_fn,
+        let dflags' = dflags { hscOutName = output_fn,
                                extCoreName = src_basename ++ ".hcr" }
 
         setDynFlags dflags'





More information about the ghc-commits mailing list