summaryrefslogtreecommitdiff
path: root/compiler/main/DriverPipeline.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-08-26 18:56:41 +0000
committerIan Lynagh <igloo@earth.li>2008-08-26 18:56:41 +0000
commitfc9bbbab3fe56cf0ff5723abbdb0f496d257f34e (patch)
treea33e6fa419a82c77d00c841f5eedd684a661bcc6 /compiler/main/DriverPipeline.hs
parent54280054ee1848698d4462ff8f85f3b46bf0a26d (diff)
downloadhaskell-fc9bbbab3fe56cf0ff5723abbdb0f496d257f34e.tar.gz
Give locations of flag warnings/errors
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r--compiler/main/DriverPipeline.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index e246b8b670..7620d074bd 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -46,8 +46,7 @@ import StringBuffer ( hGetStringBuffer )
import BasicTypes ( SuccessFlag(..) )
import Maybes ( expectJust )
import ParserCoreUtils ( getCoreModuleName )
-import SrcLoc ( unLoc )
-import SrcLoc ( Located(..) )
+import SrcLoc
import FastString
import Exception
@@ -616,12 +615,12 @@ runPhase (Unlit sf) _stop hsc_env _basename _suff input_fn get_output_fn maybe_l
-- Cpp phase : (a) gets OPTIONS out of file
-- (b) runs cpp if necessary
-runPhase (Cpp sf) _stop hsc_env basename suff input_fn get_output_fn maybe_loc
+runPhase (Cpp sf) _stop hsc_env _basename _suff input_fn get_output_fn maybe_loc
= do let dflags0 = hsc_dflags hsc_env
src_opts <- getOptionsFromFile dflags0 input_fn
- (dflags, unhandled_flags, warns) <- parseDynamicFlags dflags0 (map unLoc src_opts)
+ (dflags, unhandled_flags, warns) <- parseDynamicFlags dflags0 src_opts
handleFlagWarnings dflags warns
- checkProcessArgsResult unhandled_flags (basename <.> suff)
+ checkProcessArgsResult unhandled_flags
if not (dopt Opt_Cpp dflags) then
-- no need to preprocess CPP, just pass input file along