From the docs:
<para>Suppress any unsolicited debugging output. When GHC
has been built with the <literal>DEBUG</literal> option it
occasionally emits debug output of interest to developers.
The extra output can confuse the testing framework and
cause bogus test failures, so this flag is provided to
turn it off.</para>
| Opt_D_dump_view_pattern_commoning
| Opt_D_faststring_stats
| Opt_DumpToFile -- ^ Append dump output to files instead of stdout.
| Opt_D_dump_view_pattern_commoning
| Opt_D_faststring_stats
| Opt_DumpToFile -- ^ Append dump output to files instead of stdout.
+ | Opt_D_no_debug_output
| Opt_DoCoreLinting
| Opt_DoStgLinting
| Opt_DoCmmLinting
| Opt_DoCoreLinting
| Opt_DoStgLinting
| Opt_DoCmmLinting
opt_PprUserLength,
opt_SuppressUniques,
opt_PprStyle_Debug,
opt_PprUserLength,
opt_SuppressUniques,
opt_PprStyle_Debug,
-- profiling opts
opt_AutoSccsOnAllToplevs,
-- profiling opts
opt_AutoSccsOnAllToplevs,
, ( "dsuppress-uniques", PassFlag addOpt )
, ( "dppr-user-length", AnySuffix addOpt )
, ( "dopt-fuel", AnySuffix addOpt )
, ( "dsuppress-uniques", PassFlag addOpt )
, ( "dppr-user-length", AnySuffix addOpt )
, ( "dopt-fuel", AnySuffix addOpt )
+ , ( "dno-debug-output", PassFlag addOpt )
-- rest of the debugging flags are dynamic
--------- Profiling --------------------------------------------------
-- rest of the debugging flags are dynamic
--------- Profiling --------------------------------------------------
opt_PprUserLength = lookup_def_int "-dppr-user-length" 5 --ToDo: give this a name
opt_Fuel :: Int
opt_Fuel = lookup_def_int "-dopt-fuel" maxBound
opt_PprUserLength = lookup_def_int "-dppr-user-length" 5 --ToDo: give this a name
opt_Fuel :: Int
opt_Fuel = lookup_def_int "-dopt-fuel" maxBound
+opt_NoDebugOutput :: Bool
+opt_NoDebugOutput = lookUp (fsLit "-dno-debug-output")
+
-- profiling opts
opt_AutoSccsOnAllToplevs :: Bool
-- profiling opts
opt_AutoSccsOnAllToplevs :: Bool
import {-# SOURCE #-} Module( Module, ModuleName, moduleName )
import {-# SOURCE #-} OccName( OccName )
import {-# SOURCE #-} Module( Module, ModuleName, moduleName )
import {-# SOURCE #-} OccName( OccName )
-import StaticFlags ( opt_PprStyle_Debug, opt_PprUserLength )
import FastString
import FastTypes
import qualified Pretty
import FastString
import FastTypes
import qualified Pretty
pprPgmError = pprAndThen pgmError -- Throw an exn saying "bug in pgm being compiled"
-- (used for unusual pgm errors)
pprPgmError = pprAndThen pgmError -- Throw an exn saying "bug in pgm being compiled"
-- (used for unusual pgm errors)
-pprTrace = pprAndThen trace
+pprTrace str doc x
+ | opt_NoDebugOutput = x
+ | otherwise = pprAndThen trace str doc x
pprPanicFastInt :: String -> SDoc -> FastInt
pprPanicFastInt heading pretty_msg = panicFastInt (show (doc PprDebug))
pprPanicFastInt :: String -> SDoc -> FastInt
pprPanicFastInt heading pretty_msg = panicFastInt (show (doc PprDebug))
msg]
warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a
msg]
warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a
+warnPprTrace _ _file _line _msg x | opt_NoDebugOutput = x
warnPprTrace False _file _line _msg x = x
warnPprTrace True file line msg x
= trace (show (doc PprDebug)) x
warnPprTrace False _file _line _msg x = x
warnPprTrace True file line msg x
= trace (show (doc PprDebug)) x
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
- <term>
- <option>-dshow-unused-imports</option>
- <indexterm><primary><option>-dshow-unused-imports</option></primary></indexterm>
+ <term>
+ <option>-dno-debug-output</option>
+ <indexterm><primary><option>-dno-debug-output</option></primary></indexterm>
- <listitem>
- <para>Have the renamer report what imports does not
- contribute.</para>
- </listitem>
+ <listitem>
+ <para>Suppress any unsolicited debugging output. When GHC
+ has been built with the <literal>DEBUG</literal> option it
+ occasionally emits debug output of interest to developers.
+ The extra output can confuse the testing framework and
+ cause bogus test failures, so this flag is provided to
+ turn it off.</para>
+ </listitem>
</varlistentry>
</variablelist>
</sect2>
</varlistentry>
</variablelist>
</sect2>
<entry>-</entry>
</row>
<row>
<entry>-</entry>
</row>
<row>
+ <entry><option>-dno-debug-output</option></entry>
+ <entry>Suppress unsolicited debugging output</entry>
+ <entry>static</entry>
+ <entry>-</entry>
+ </row>
+ <row>
<entry><option>-dppr-debug</option></entry>
<entry>Turn on debug printing (more verbose)</entry>
<entry>static</entry>
<entry><option>-dppr-debug</option></entry>
<entry>Turn on debug printing (more verbose)</entry>
<entry>static</entry>