</varlistentry>
<varlistentry>
+ <term><filename>.ll</filename></term>
+ <listitem>
+ <para>An llvm-intermediate-language source file, usually
+ produced by the compiler.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><filename>.bc</filename></term>
+ <listitem>
+ <para>An llvm-intermediate-language bitcode file, usually
+ produced by the compiler.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><filename>.s</filename></term>
<listitem>
<para>An assembly-language source file, usually produced by
<varlistentry>
<term>
<cmdsynopsis>
+ <command>ghc --supported-extensions</command>
<command>ghc --supported-languages</command>
</cmdsynopsis>
- <indexterm><primary><option>––supported-languages</option></primary></indexterm>
+ <indexterm><primary><option>––supported-extensions</option></primary><primary><option>––supported-languages</option></primary></indexterm>
</term>
<listitem>
<para>Print the supported language extensions.</para>
suspicious code. The warnings that are
<emphasis>not</emphasis> enabled by <option>-Wall</option>
are
- <option>-fwarn-simple-patterns</option>,
<option>-fwarn-tabs</option>,
<option>-fwarn-incomplete-record-updates</option>,
<option>-fwarn-monomorphism-restriction</option>,
is bound in a way that looks lazy, e.g.
<literal>where (I# x) = ...</literal>. Use
<literal>where !(I# x) = ...</literal> instead. This will be an
- error, rather than a warning, in GHC 6.14.
+ error, rather than a warning, in GHC 7.2.
</para>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
+ <term><option>-fwarn-identities</option>:</term>
+ <listitem>
+ <indexterm><primary><option>-fwarn-identities</option></primary></indexterm>
+ <para>Causes the compiler to emit a warning when a Prelude numeric
+ conversion converts a type T to the same type T; such calls
+ are probably no-ops and can be omitted. The functions checked for
+ are: <literal>toInteger</literal>,
+ <literal>toRational</literal>,
+ <literal>fromIntegral</literal>,
+ and <literal>realToFrac</literal>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-fwarn-implicit-prelude</option>:</term>
<listitem>
<indexterm><primary><option>-fwarn-implicit-prelude</option></primary></indexterm>
<indexterm><primary>incomplete patterns, warning</primary></indexterm>
<indexterm><primary>patterns, incomplete</primary></indexterm>
- <para>Similarly for incomplete patterns, the function
- <function>g</function> below will fail when applied to
+ <para>Similarly for incomplete patterns, the functions
+ <function>g</function> and <function>h</function> below will fail when applied to
non-empty lists, so the compiler will emit a warning about
this when <option>-fwarn-incomplete-patterns</option> is
enabled.</para>
<programlisting>
g [] = 2
+h = \[] -> 2
</programlisting>
<para>This option isn't enabled by default because it can be
</varlistentry>
<varlistentry>
- <term><option>-fwarn-simple-patterns</option>:</term>
- <listitem>
- <indexterm><primary><option>-fwarn-simple-patterns</option></primary>
- </indexterm>
- <para>Causes the compiler to warn about lambda-bound
- patterns that can fail, eg. <literal>\(x:xs)->...</literal>.
- Normally, these aren't treated as incomplete patterns by
- <option>-fwarn-incomplete-patterns</option>.</para>
- <para>“Lambda-bound patterns” includes all places where there is a single pattern,
- including list comprehensions and do-notation. In these cases, a pattern-match
- failure is quite legitimate, and triggers filtering (list comprehensions) or
- the monad <literal>fail</literal> operation (monads). For example:
- <programlisting>
- f :: [Maybe a] -> [a]
- f xs = [y | Just y <- xs]
- </programlisting>
- Switching on <option>-fwarn-simple-patterns</option> will elicit warnings about
- these probably-innocent cases, which is why the flag is off by default. </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><option>-fwarn-tabs</option>:</term>
<listitem>
<indexterm><primary><option>-fwarn-tabs</option></primary></indexterm>
e.g., the ‘default default’ for Haskell 1.4 caused the
otherwise unconstrained value <constant>1</constant> to be
given the type <literal>Int</literal>, whereas Haskell 98
+ and later
defaults it to <literal>Integer</literal>. This may lead to
differences in performance and behaviour, hence the
usefulness of being non-silent about this.</para>
<option>-O</option>.</para>
</listitem>
</varlistentry>
-
- <varlistentry>
- <term>
- <option>-Ofile <file></option>:
- <indexterm><primary>-Ofile <file> option</primary></indexterm>
- <indexterm><primary>optimising, customised</primary></indexterm>
- </term>
- <listitem>
- <para>(NOTE: not supported since GHC 4.x. Please ask if
- you're interested in this.)</para>
-
- <para>For those who need <emphasis>absolute</emphasis>
- control over <emphasis>exactly</emphasis> what options are
- used (e.g., compiler writers, sometimes :-), a list of
- options can be put in a file and then slurped in with
- <option>-Ofile</option>.</para>
-
- <para>In that file, comments are of the
- <literal>#</literal>-to-end-of-line variety; blank
- lines and most whitespace is ignored.</para>
-
- <para>Please ask if you are baffled and would like an
- example of <option>-Ofile</option>!</para>
- </listitem>
- </varlistentry>
</variablelist>
<para>We don't use a <option>-O*</option> flag for day-to-day
<term><option>-msse2</option>:</term>
<listitem>
<para>
- (x86 only, added in GHC 6.14.1) Use the SSE2 registers and
+ (x86 only, added in GHC 7.0.1) Use the SSE2 registers and
instruction set to implement floating point operations
when using the native code generator. This gives a
substantial performance improvement for floating point,
<filename>.hcr</filename>. The Core format is described in <ulink url="../../core.pdf">
<citetitle>An External Representation for the GHC Core Language</citetitle></ulink>,
and sample tools
- for manipulating Core files (in Haskell) are in the GHC source distribution
- directory under <literal>utils/ext-core</literal>.
- Note that the format of <literal>.hcr</literal>
+ for manipulating Core files (in Haskell) are available in the
+ <ulink url="http://hackage.haskell.org/package/extcore">extcore package on Hackage</ulink>. Note that the format of <literal>.hcr</literal>
files is <emphasis>different</emphasis> from the Core output format that GHC generates
for debugging purposes (<xref linkend="options-debugging"/>), though the two formats appear somewhat similar.</para>
<!-- Emacs stuff:
;;; Local Variables: ***
- ;;; mode: xml ***
;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***
;;; End: ***
-->