Don't redundantly set hscTarget to the same value it already was
authorIan Lynagh <ian@well-typed.com>
Sat, 2 Mar 2013 17:39:43 +0000 (17:39 +0000)
committerIan Lynagh <ian@well-typed.com>
Sat, 2 Mar 2013 17:39:43 +0000 (17:39 +0000)
compiler/main/DriverPipeline.hs

index 0d86dcb..577cb61 100644 (file)
@@ -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'