Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : ghc-7.2
http://hackage.haskell.org/trac/ghc/changeset/ec1e12b32d5d600cf53602b5fd66e4a3c61ff853 >--------------------------------------------------------------- commit ec1e12b32d5d600cf53602b5fd66e4a3c61ff853 Author: Simon Marlow <[email protected]> Date: Thu Jul 21 14:55:20 2011 +0100 show warning flags in :set (lost in the recent dopt->wopt change, noticed by test ghci024) >--------------------------------------------------------------- ghc/InteractiveUI.hs | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index 5b44097..5091494 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -1609,16 +1609,28 @@ setCmd "" )) dflags <- getDynFlags liftIO $ putStrLn (showSDoc ( - vcat (text "GHCi-specific dynamic flag settings:" - :map (flagSetting dflags) ghciFlags) + text "GHCi-specific dynamic flag settings:" $$ + nest 2 (vcat (map (flagSetting dflags) ghciFlags)) )) liftIO $ putStrLn (showSDoc ( - vcat (text "other dynamic, non-language, flag settings:" - :map (flagSetting dflags) others) + text "other dynamic, non-language, flag settings:" $$ + nest 2 (vcat (map (flagSetting dflags) others)) )) + liftIO $ putStrLn (showSDoc ( + text "warning settings:" $$ + nest 2 (vcat (map (warnSetting dflags) DynFlags.fWarningFlags)) + )) + where flagSetting dflags (str, _, f, _) - | dopt f dflags = text " " <> text "-f" <> text str - | otherwise = text " " <> text "-fno-" <> text str + | dopt f dflags = fstr str + | otherwise = fnostr str + warnSetting dflags (str, _, f, _) + | wopt f dflags = fstr str + | otherwise = fnostr str + + fstr str = text "-f" <> text str + fnostr str = text "-fno-" <> text str + (ghciFlags,others) = partition (\(_, _, f, _) -> f `elem` flags) DynFlags.fFlags flags = [Opt_PrintExplicitForalls _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
