[commit: ghc] master: Inline get_output_fn (32a1ff5)
Ian Lynagh
igloo at earth.li
Thu Feb 28 15:20:35 CET 2013
Repository : http://darcs.haskell.org/ghc.git/
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/32a1ff5f2d8b6144973bc447ad505212754d8cbb
>---------------------------------------------------------------
commit 32a1ff5f2d8b6144973bc447ad505212754d8cbb
Author: Ian Lynagh <ian at well-typed.com>
Date: Thu Feb 28 02:38:37 2013 +0000
Inline get_output_fn
It's now only used once
>---------------------------------------------------------------
compiler/main/DriverPipeline.hs | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 2f62438..05a8e62 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -584,10 +584,6 @@ runPipeline'
runPipeline' start_phase stop_phase hsc_env env input_fn
output maybe_loc maybe_stub_o
= do
- -- this is a function which will be used to calculate output file names
- -- as we go along (we partially apply it to some of its inputs here)
- let get_output_fn = getOutputFilename stop_phase output (src_basename env)
-
-- Execute the pipeline...
let state = PipeState{ hsc_env, maybe_loc, maybe_stub_o = maybe_stub_o }
@@ -604,7 +600,8 @@ runPipeline' start_phase stop_phase hsc_env env input_fn
Temporary ->
return (dflags, output_fn)
_ ->
- do final_fn <- get_output_fn dflags stop_phase maybe_loc
+ do final_fn <- getOutputFilename stop_phase output (src_basename env)
+ dflags stop_phase maybe_loc
when (final_fn /= output_fn) $ do
let msg = ("Copying `" ++ output_fn ++"' to `" ++ final_fn ++ "'")
line_prag = Just ("{-# LINE 1 \"" ++ input_fn ++ "\" #-}\n")
More information about the ghc-commits
mailing list