maintains internally, so you'll be desperately disappointed if
you try to glob etc. inside <literal>OPTIONS_GHC</literal>.</para>
- <para>NOTE: the contents of OPTIONS_GHC are prepended to the
- command-line options, so you <emphasis>do</emphasis> have the
- ability to override OPTIONS_GHC settings via the command
- line.</para>
+ <para>NOTE: the contents of OPTIONS_GHC are appended to the
+ command-line options, so options given in the source file
+ override those given on the command-line.</para>
<para>It is not recommended to move all the contents of your
Makefiles into your source files, but in some circumstances, the
<varlistentry>
<term>
<cmdsynopsis>
+ <command>ghc --show-iface <replaceable>file</replaceable></command>
+ </cmdsynopsis>
+ <indexterm><primary><option>––--show-iface</option></primary></indexterm>
+ </term>
+ <listitem>
+ <para>Read the interface in
+ <replaceable>file</replaceable> and dump it as text to
+ <literal>stdout</literal>. For example <literal>ghc --show-iface M.hi</literal>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <cmdsynopsis>
+ <command>ghc --supported-languages</command>
+ </cmdsynopsis>
+ <indexterm><primary><option>––supported-languages</option></primary></indexterm>
+ </term>
+ <listitem>
+ <para>Print the supported language extensions.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <cmdsynopsis>
+ <command>ghc --info</command>
+ </cmdsynopsis>
+ <indexterm><primary><option>––info</option></primary></indexterm>
+ </term>
+ <listitem>
+ <para>Print information about the compiler.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <cmdsynopsis>
<command>ghc --version</command>
<command>ghc -V</command>
</cmdsynopsis>
<title>Overriding the default behaviour for a file</title>
<para>As described above, the way in which a file is processed by GHC
- depends on its suffix. This behaviour can be overriden using the
+ depends on its suffix. This behaviour can be overridden using the
<option>-x</option> option:</para>
<variablelist>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-Wwarn</option>:</term>
+ <listitem>
+ <indexterm><primary><option>-Wwarn</option></primary></indexterm>
+ <para>Warnings are treated only as warnings, not as errors. This is
+ the default, but can be useful to negate a
+ <option>-Werror</option> flag.</para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
<para>The full set of warning options is described below. To turn
<para>This option causes a warning to be emitted whenever the
module contains an "orphan" instance declaration or rewrite rule.
- An instance declartion is an orphan if it appears in a module in
+ An instance declaration is an orphan if it appears in a module in
which neither the class nor the type being instanced are declared
in the same module. A rule is an orphan if it is a rule for a
function declared in another module. A module containing any
<varlistentry>
<term>
- <option>-funfolding-update-in-place=<replaceable>n</replaceable></option>
- <indexterm><primary><option>-funfolding-update-in-place</option></primary></indexterm>
- </term>
- <listitem>
- <para>Switches on an experimental "optimisation".
- Switching it on makes the compiler a little keener to
- inline a function that returns a constructor, if the
- context is that of a thunk.
-<programlisting>
- x = plusInt a b
-</programlisting>
- If we inlined plusInt we might get an opportunity to use
- update-in-place for the thunk 'x'.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
<option>-funfolding-creation-threshold=<replaceable>n</replaceable></option>:
<indexterm><primary><option>-funfolding-creation-threshold</option></primary></indexterm>
<indexterm><primary>inlining, controlling</primary></indexterm>
is also possible to obtain performance improvements with parallelism
on programs that do not use concurrency. This section describes how to
use GHC to compile and run parallel programs, in <xref
- linkend="lang-parallel" /> we desribe the language features that affect
+ linkend="lang-parallel" /> we describe the language features that affect
parallelism.</para>
<sect2 id="parallel-options">