summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-08-05 15:17:30 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-08-05 15:17:30 +0000
commitd1984e439154e95b2804ee83897e740b1713c53d (patch)
treefbe151bd55491927bf96648278ca77cb6be8bc22 /ghc
parentc8577590bd59c65effd1f178d1b97a6a0db32851 (diff)
downloadhaskell-d1984e439154e95b2804ee83897e740b1713c53d.tar.gz
Add -fno-implicit-import-qualified (#2452)
The flag is off by default, but GHCi turns it on (in Main.hs). For GHCi it can be overriden on the command-line or using :set.
Diffstat (limited to 'ghc')
-rw-r--r--ghc/Main.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs
index a2c2fd1a52..840f84341d 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -125,9 +125,16 @@ main =
_other -> 1
}
+ -- turn on -fimplicit-import-qualified for GHCi now, so that it
+ -- can be overriden from the command-line
+ dflags1a | DoInteractive <- cli_mode = imp_qual_enabled
+ | DoEval _ <- cli_mode = imp_qual_enabled
+ | otherwise = dflags1
+ where imp_qual_enabled = dflags1 `dopt_set` Opt_ImplicitImportQualified
+
-- The rest of the arguments are "dynamic"
-- Leftover ones are presumably files
- (dflags2, fileish_args, dynamicFlagWarnings) <- GHC.parseDynamicFlags dflags1 argv3
+ (dflags2, fileish_args, dynamicFlagWarnings) <- GHC.parseDynamicFlags dflags1a argv3
let flagWarnings = staticFlagWarnings
++ modeFlagWarnings