Add a -Warn flag
[ghc-hetmet.git] / compiler / main / DynFlags.hs
index f2906e7..44bedce 100644 (file)
 --
 -----------------------------------------------------------------------------
 
+{-# OPTIONS -w #-}
+-- The above warning supression flag is a temporary kludge.
+-- While working on this module you are encouraged to remove it and fix
+-- any warnings in the module. See
+--     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
+-- for details
+
 module DynFlags (
        -- Dynamic flags
        DynFlag(..),
@@ -102,7 +109,7 @@ data DynFlag
    | Opt_D_dump_asm_regalloc
    | Opt_D_dump_asm_regalloc_stages
    | Opt_D_dump_asm_conflicts
-   | Opt_D_drop_asm_stats
+   | Opt_D_dump_asm_stats
    | Opt_D_dump_cpranal
    | Opt_D_dump_deriv
    | Opt_D_dump_ds
@@ -142,7 +149,7 @@ data DynFlag
    | Opt_D_dump_minimal_imports
    | Opt_D_dump_mod_cycles
    | Opt_D_faststring_stats
-   | Opt_DumpToFile                    -- Redirect dump output to files instead of stdout.
+   | Opt_DumpToFile                    -- ^ Append dump output to files instead of stdout.
    | Opt_DoCoreLinting
    | Opt_DoStgLinting
    | Opt_DoCmmLinting
@@ -1028,7 +1035,7 @@ dynamic_flags = [
   ,  ( "ddump-asm-conflicts",    setDumpFlag Opt_D_dump_asm_conflicts)
   ,  ( "ddump-asm-regalloc-stages",
                                  setDumpFlag Opt_D_dump_asm_regalloc_stages)
-  ,  ( "ddrop-asm-stats",        setDumpFlag Opt_D_drop_asm_stats)
+  ,  ( "ddump-asm-stats",        setDumpFlag Opt_D_dump_asm_stats)
   ,  ( "ddump-cpranal",         setDumpFlag Opt_D_dump_cpranal)
   ,  ( "ddump-deriv",           setDumpFlag Opt_D_dump_deriv)
   ,  ( "ddump-ds",              setDumpFlag Opt_D_dump_ds)
@@ -1081,12 +1088,13 @@ dynamic_flags = [
   ,  ( "monly-3-regs",         NoArg (upd (\s -> s{stolen_x86_regs = 3}) ))
   ,  ( "monly-4-regs",         NoArg (upd (\s -> s{stolen_x86_regs = 4}) ))
 
-       ------ Warning opts -------------------------------------------------
-  ,  ( "W"             , NoArg (mapM_ setDynFlag   minusWOpts)    )
-  ,  ( "Werror"                , NoArg (setDynFlag         Opt_WarnIsError) )
-  ,  ( "Wall"          , NoArg (mapM_ setDynFlag   minusWallOpts) )
-  ,  ( "Wnot"          , NoArg (mapM_ unSetDynFlag minusWallOpts) ) /* DEPREC */
-  ,  ( "w"             , NoArg (mapM_ unSetDynFlag minuswRemovesOpts) )
+     ------ Warning opts -------------------------------------------------
+  ,  ( "W"     , NoArg (mapM_ setDynFlag   minusWOpts)    )
+  ,  ( "Werror", NoArg (setDynFlag         Opt_WarnIsError) )
+  ,  ( "Wwarn" , NoArg (unSetDynFlag       Opt_WarnIsError) )
+  ,  ( "Wall"  , NoArg (mapM_ setDynFlag   minusWallOpts) )
+  ,  ( "Wnot"  , NoArg (mapM_ unSetDynFlag minusWallOpts) ) -- DEPRECATED
+  ,  ( "w"     , NoArg (mapM_ unSetDynFlag minuswRemovesOpts) )
 
        ------ Optimisation flags ------------------------------------------
   ,  ( "O"     , NoArg (upd (setOptLevel 1)))
@@ -1682,10 +1690,13 @@ compilerInfo = [("Project name",                cProjectName),
                 ("Booter version",              cBooterVersion),
                 ("Stage",                       cStage),
                 ("Interface file version",      cHscIfaceFileVersion),
+                ("Have interpreter",            cGhcWithInterpreter),
                 ("Object splitting",            cSplitObjs),
                 ("Have native code generator",  cGhcWithNativeCodeGen),
+                ("Support SMP",                 cGhcWithSMP),
                 ("Unregisterised",              cGhcUnregisterised),
                 ("Tables next to code",         cGhcEnableTablesNextToCode),
                 ("Win32 DLLs",                  cEnableWin32DLLs),
+                ("RTS ways",                    cGhcRTSWays),
                 ("Leading underscore",          cLeadingUnderscore)]