4.6. Help and verbosity options

Does a dry-run, i.e. GHC goes through all the motions
of compiling as normal, but does not actually run any
external commands.

-v

The -v option makes GHC
verbose: it reports its version number
and shows (on stderr) exactly how it invokes each phase of
the compilation system. Moreover, it passes the
-v flag to most phases; each reports its
version number (and possibly some other information).

Please, oh please, use the -v option
when reporting bugs! Knowing that you ran the right bits in
the right order is always the first thing we want to
verify.

-vn

To provide more control over the compiler's verbosity,
the -v flag takes an optional numeric
argument. Specifying -v on its own is
equivalent to -v3, and the other levels
have the following meanings:

-v0

Disable all non-essential messages (this is the
default).

-v1

Minimal verbosity: print one line per
compilation (this is the default when
––make or
––interactive is on).

-v2

Print the name of each compilation phase as it
is executed. (equivalent to
-dshow-passes).

-v3

The same as -v2, except that in
addition the full command line (if appropriate) for
each compilation phase is also printed.

-v4

The same as -v3 except that the
intermediate program representation after each
compilation phase is also printed (excluding
preprocessed and C/assembly files).

-ferror-spans

Causes GHC to emit the full source span of the
syntactic entity relating to an error message. Normally, GHC
emits the source location of the start of the syntactic
entity only.