<tag>@-ddump-<pass>@:</tag>
<nidx>-ddump-<pass> options</nidx>
Make a debugging dump after pass @<pass>@ (may be common enough to
-need a short form...). Some of the most useful ones are:
+need a short form...). You can get all of these at once (<em/lots/ of
+output) by using @-ddump-all@, or most of them with @-ddump-most@.
+Some of the most useful ones are:
-<tabular ca="ll">
-@-ddump-rdr@ | reader output (earliest stuff in the compiler) @@
-@-ddump-rn@ | renamer output @@
-@-ddump-tc@ | typechecker output @@
-@-ddump-deriv@ | derived instances @@
-@-ddump-ds@ | desugarer output @@
-@-ddump-simpl@ | simplifer output (Core-to-Core passes) @@
-@-ddump-stranal@ | strictness analyser output @@
-@-ddump-occur-anal@ | `occurrence analysis' output @@
-@-ddump-spec@ | dump specialisation info @@
-@-ddump-stg@ | output of STG-to-STG passes @@
-@-ddump-absC@ | <em>un</em>flattened Abstract~C @@
-@-ddump-flatC@ | <em>flattened</em> Abstract~C @@
-@-ddump-realC@ | same as what goes to the C compiler @@
-@-ddump-asm@ | assembly language from the native-code generator @@
-</tabular>
+<descrip>
+<tag>@-ddump-parsed@:</tag> parser output
+<tag>@-ddump-rn@:</tag> renamer output
+<tag>@-ddump-tc@:</tag> typechecker output
+<tag>@-ddump-deriv@:</tag> derived instances
+<tag>@-ddump-ds@:</tag> desugarer output
+<tag>@-ddump-spec@:</tag> output of specialisation pass
+<tag>@-ddump-rules@:</tag> dumps all rewrite rules (including those generated by the specialisation pass)
+<tag>@-ddump-simpl@:</tag> simplifer output (Core-to-Core passes)
+<tag>@-ddump-usagesp@:</tag> UsageSP inference pre-inf and output
+<tag>@-ddump-cpranal@:</tag> CPR analyser output
+<tag>@-ddump-stranal@:</tag> strictness analyser output
+<tag>@-ddump-workwrap@:</tag> worker/wrapper split output
+<tag>@-ddump-occur-anal@:</tag> `occurrence analysis' output
+<tag>@-ddump-stg@:</tag> output of STG-to-STG passes
+<tag>@-ddump-absC@:</tag> <em>un</em>flattened Abstract~C
+<tag>@-ddump-flatC@:</tag> <em>flattened</em> Abstract~C
+<tag>@-ddump-realC@:</tag> same as what goes to the C compiler
+<tag>@-ddump-asm@:</tag> assembly language from the native-code generator
+<tag>@-ddump-most@:</tag> most of the above, plus @-dshow-passes@, @-dsource-stats@, @-ddump-simpl-stats@,
+<tag>@-ddump-all@:</tag> all the above, plus @-ddump-inlinings@,
+@-ddump-simpl-iterations@, @-ddump-rn-trace@,
+@-ddump-verbose-simpl@, @-ddump-verbose-stg@.
+</descrip>
-<nidx>-ddump-rdr option</nidx>%
+<nidx>-ddump-all option</nidx>%
+<nidx>-ddump-most option</nidx>%
+<nidx>-ddump-parsed option</nidx>%
<nidx>-ddump-rn option</nidx>%
<nidx>-ddump-tc option</nidx>%
<nidx>-ddump-deriv option</nidx>%
<nidx>-ddump-ds option</nidx>%
<nidx>-ddump-simpl option</nidx>%
+<nidx>-ddump-cpranal option</nidx>%
+<nidx>-ddump-workwrap option</nidx>%
+<nidx>-ddump-rules option</nidx>%
+<nidx>-ddump-usagesp option</nidx>%
<nidx>-ddump-stranal option</nidx>%
<nidx>-ddump-occur-anal option</nidx>%
<nidx>-ddump-spec option</nidx>%
the simplifier has a maximum number of iterations, normally 4). Used
when even @-dverbose-simpl@ doesn't cut it.
-<tag>@-dppr-{user,debug,all@}:</tag>
+<tag>@-dppr-{user,debug@}:</tag>
<nidx>-dppr-user option</nidx>
<nidx>-dppr-debug option</nidx>
-<nidx>-dppr-all option</nidx>
Debugging output is in one of several ``styles.'' Take the printing
of types, for example. In the ``user'' style, the compiler's internal
ideas about types are presented in Haskell source-level syntax,
insofar as possible. In the ``debug'' style (which is the default for
-debugging output), the types are printed in the most-often-desired
-form, with explicit foralls, etc. In the ``show all'' style, very
-verbose information about the types (e.g., the Uniques on the
-individual type variables) is displayed.
+debugging output), the types are printed in with
+explicit foralls, and variables have their unique-id attached (so you
+can check for things that look the same but aren't).
+
+<tag>@-ddump-simpl-stats@:</tag>
+<nidx>-ddump-simpl-stats option</nidx>
+Dump statistics about how many of each kind
+of transformation too place. If you add @-dppr-debug@ you get more detailed information.
<tag>@-ddump-raw-asm@:</tag>
<nidx>-ddump-raw-asm option</nidx>
%-ddump-asm-globals-info
%----------------------------------------------------------------------
+<sect2>Checking for consistency
+<label id="checking-consistency">
+<p>
+<nidx>consistency checks</nidx>
+<nidx>lint</nidx>
+
+<descrip>
+<tag>@-dcore-lint@:</tag>
+<nidx>-dcore-lint option</nidx>
+Turn on heavyweight intra-pass sanity-checking within GHC, at Core
+level. (It checks GHC's sanity, not yours.)
+
+<tag>@-dstg-lint@:</tag>
+<nidx>-dstg-lint option</nidx>
+Ditto for STG level.
+
+<tag>@-dusagesp-lint@:</tag>
+<nidx>-dstg-lint option</nidx>
+Turn on checks around UsageSP inference (@-fusagesp@). This verifies
+various simple properties of the results of the inference, and also
+warns if any identifier with a used-once annotation before the
+inference has a used-many annotation afterwards; this could indicate a
+non-worksafe transformation is being applied.
+</descrip>
+
+%----------------------------------------------------------------------
<sect2>How to read Core syntax (from some @-ddump-*@ flags)
<p>
<nidx>reading Core syntax</nidx>
trademark of Peyton Jones Enterprises, plc.)
%----------------------------------------------------------------------
-<sect2>Command line options in source files
-<label id="source-file-options">
-<p>
-<nidx>source-file options</nidx>
-
-Sometimes it is useful to make the connection between a source file
-and the command-line options it requires quite tight. For instance,
-if a (Glasgow) Haskell source file uses @casm@s, the C back-end
-often needs to be told about which header files to include. Rather than
-maintaining the list of files the source depends on in a
-@Makefile@ (using the @-#include@ command-line option), it is
-possible to do this directly in the source file using the @OPTIONS@
-pragma <nidx>OPTIONS pragma</nidx>:
-
-<tscreen><verb>
-{-# OPTIONS -#include "foo.h" #-}
-module X where
-
-...
-</verb></tscreen>
-
-@OPTIONS@ pragmas are only looked for at the top of your source
-files, upto the first (non-literate,non-empty) line not containing
-@OPTIONS@. Multiple @OPTIONS@ pragmas are recognised. Note
-that your command shell does not get to the source file options, they
-are just included literally in the array of command-line arguments
-the compiler driver maintains internally, so you'll be desperately
-disappointed if you try to glob etc. inside @OPTIONS@.
-
-NOTE: the contents of OPTIONS are prepended to the command-line
-options, so you *do* have the ability to override OPTIONS settings
-via the command line.
-
-It is not recommended to move all the contents of your Makefiles into
-your source files, but in some circumstances, the @OPTIONS@ pragma
-is the Right Thing. (If you use @-keep-hc-file-too@ and have OPTION
-flags in your module, the OPTIONS will get put into the generated .hc
-file).
-
-%----------------------------------------------------------------------