Merge branch 'master' into ghc-new-co
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 20 Apr 2011 10:32:05 +0000 (11:32 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 20 Apr 2011 10:32:05 +0000 (11:32 +0100)
1  2 
compiler/main/DynFlags.hs

@@@ -40,7 -40,7 +40,7 @@@ module DynFlags 
          initDynFlags,                   -- DynFlags -> IO DynFlags
  
          getOpts,                        -- DynFlags -> (DynFlags -> [a]) -> [a]
-         getVerbFlag,
+         getVerbFlags,
          updOptLevel,
          setTmpDir,
          setPackageName,
@@@ -758,7 -758,7 +758,7 @@@ defaultDynFlags 
                            SevOutput -> printOutput (msg style)
                            SevInfo   -> printErrs (msg style)
                            SevFatal  -> printErrs (msg style)
 -                          _         -> do 
 +                          _         -> do
                                  hPutChar stderr '\n'
                                  printErrs ((mkLocMessage srcSpan msg) style)
                       -- careful (#2302): printErrs prints in UTF-8, whereas
@@@ -873,10 -873,10 +873,10 @@@ getOpts dflags opts = reverse (opts dfl
  
  -- | Gets the verbosity flag for the current verbosity level. This is fed to
  -- other tools, so GHC-specific verbosity flags like @-ddump-most@ are not included
- getVerbFlag :: DynFlags -> String
- getVerbFlag dflags
-   | verbosity dflags >= 3  = "-v"
-   | otherwise =  ""
+ getVerbFlags :: DynFlags -> [String]
+ getVerbFlags dflags
+   | verbosity dflags >= 4 = ["-v"]
+   | otherwise             = []
  
  setObjectDir, setHiDir, setStubDir, setOutputDir, setDylibInstallName,
           setObjectSuf, setHiSuf, setHcSuf, parseDynLibLoaderMode,
@@@ -1919,13 -1919,14 +1919,13 @@@ forceRecompile :: DynP (
  -- recompiled which probably isn't what you want
  forceRecompile = do { dfs <- liftEwM getCmdLineState
                    ; when (force_recomp dfs) (setDynFlag Opt_ForceRecomp) }
 -      where
 +        where
          force_recomp dfs = isOneShot (ghcMode dfs)
  
  setVerboseCore2Core :: DynP ()
  setVerboseCore2Core = do forceRecompile
                           setDynFlag Opt_D_verbose_core2core 
                           upd (\dfs -> dfs { shouldDumpSimplPhase = Nothing })
 -                       
  
  setDumpSimplPhases :: String -> DynP ()
  setDumpSimplPhases s = do forceRecompile
@@@ -2043,6 -2044,7 +2043,6 @@@ addImportPath, addLibraryPath, addInclu
  addImportPath "" = upd (\s -> s{importPaths = []})
  addImportPath p  = upd (\s -> s{importPaths = importPaths s ++ splitPathList p})
  
 -
  addLibraryPath p =
    upd (\s -> s{libraryPaths = libraryPaths s ++ splitPathList p})