<listitem>
<para>GHC doesn't have to be restarted for each compilation,
which means it can cache information between compilations.
- Compiling a muli-module program with <literal>ghc
+ Compiling a multi-module program with <literal>ghc
––make</literal> can be up to twice as fast as
running <literal>ghc</literal> individually on each source
file.</para>
pragma (see <xref linkend="source-file-options"/>).</para>
<para>If the program needs to be linked with additional objects
- (say, some auxilliary C code), then the object files can be
+ (say, some auxiliary C code), then the object files can be
given on the command line and GHC will include them when linking
the executable.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-ferror-spans</option>
+ <indexterm><primary><option>-ferror-spans</option></primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>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.</para>
+
+ <para>For example:</para>
+
+<screen>test.hs:3:6: parse error on input `where'</screen>
+
+ <para>becomes:</para>
+
+<screen>test296.hs:3:6-10: parse error on input `where'</screen>
+
+ <para>And multi-line spans are possible too:</para>
+
+<screen>test.hs:(5,4)-(6,7):
+ Conflicting definitions for `a'
+ Bound at: test.hs:5:4
+ test.hs:6:7
+ In the binding group for: a, b, a</screen>
+
+ <para>Note that line numbers start counting at one, but
+ column numbers start at zero. This choice was made to
+ follow existing convention (i.e. this is how Emacs does
+ it).</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</sect1>
</varlistentry>
<varlistentry>
+ <term><option>-fwarn-incomplete-record-updates</option>:</term>
+ <listitem>
+ <indexterm><primary><option>-fwarn-incomplete-record-updates</option></primary></indexterm>
+ <indexterm><primary>incomplete record updates, warning</primary></indexterm>
+ <indexterm><primary>record updates, incomplete</primary></indexterm>
+
+ <para>The function
+ <function>f</function> below will fail when applied to
+ <literal>Bar</literal>, so the compiler will emit a warning about
+ this when <option>-fwarn-incomplete-record-updates</option> is
+ enabled.</para>
+
+<programlisting>
+data Foo = Foo { x :: Int }
+ | Bar
+
+f :: Foo -> Foo
+f foo = foo { x = 6 }
+</programlisting>
+
+ <para>This option isn't enabled be default because it can be
+ very noisy, and it often doesn't indicate a bug in the
+ program.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>
<option>-fwarn-misc</option>:
<indexterm><primary><option>-fwarn-misc</option></primary></indexterm>
only)</primary></indexterm> Means to pass the like-named
option to GCC; it says to use the Version 8 SPARC
instructions, notably integer multiply and divide. The
- similiar <option>-m*</option> GCC options for SPARC also
+ similar <option>-m*</option> GCC options for SPARC also
work, actually.</para>
</listitem>
</varlistentry>
<para>GHC can also read in External Core files as source; just give the <literal>.hcr</literal> file on
the command line, instead of the <literal>.hs</literal> or <literal>.lhs</literal> Haskell source.
-A current infelicity is that you need to give teh <literal>-fglasgow-exts</literal> flag too, because
+A current infelicity is that you need to give the <literal>-fglasgow-exts</literal> flag too, because
ordinary Haskell 98, when translated to External Core, uses things like rank-2 types.</para>
</sect1>