</varlistentry>
<varlistentry>
- <term><literal>--cc=PROG</literal></term>
+ <term><literal>-c PROG</literal> or
+ <literal>--cc=PROG</literal></term>
<listitem>
<para>The C compiler to use (default:
<command>ghc</command>)</para>
</varlistentry>
<varlistentry>
- <term><literal>--ld=PROG</literal></term>
+ <term><literal>-l PROG</literal> or
+ <literal>--ld=PROG</literal></term>
<listitem>
<para>The linker to use (default:
<command>gcc</command>).</para>
</varlistentry>
<varlistentry>
- <term><literal>--cflag=FLAG</literal></term>
+ <term><literal>-C FLAG</literal> or
+ <literal>--cflag=FLAG</literal></term>
<listitem>
<para>An extra flag to pass to the C compiler.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>--lflag=FLAG</literal></term>
+ <term><literal>-L FLAG</literal> or
+ <literal>--lflag=FLAG</literal></term>
<listitem>
<para>An extra flag to pass to the linker.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>--include=FILE</literal></term>
+ <term><literal>-i FILE</literal> or
+ <literal>--include=FILE</literal></term>
<listitem>
<para>As if the appropriate <literal>#include</literal>
directive was placed in the source.</para>
</varlistentry>
<varlistentry>
+ <term><literal>-D NAME[=VALUE]</literal> or
+ <literal>--define=NAME[=VALUE]</literal></term>
+ <listitem>
+ <para>As if the appropriate <literal>#define</literal>
+ directive was placed in the source.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>-o FILE</literal> or
+ <literal>--output=FILE</literal></term>
+ <listitem>
+ <para>Name of the Haskell file.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><literal>--help</literal></term>
<listitem>
<para>Display a summary of the available flags.</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><literal>--version</literal></term>
+ <listitem>
+ <para>Output version information.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
- <para>The input file should end with .hsc. Output files get
- names with the <literal>.hsc</literal> suffix replaced:</para>
+ <para>The input file should end with .hsc. Output files by
+ default get names with the <literal>.hsc</literal> suffix
+ replaced:</para>
<informaltable>
<tgroup cols=2>
<entry>Haskell file</entry>
</row>
<row>
- <entry><literal>.hs.h</literal></entry>
+ <entry><literal>_hsc.h</literal></entry>
<entry>C header</entry>
</row>
<row>
- <entry><literal>.hs.c</literal></entry>
+ <entry><literal>_hsc.c</literal></entry>
<entry>C file</entry>
</row>
</tbody>
</sect2>
<sect2><title>Input syntax</title>
- <para>All special processing is triggered by the
- <literal>#</literal> character placed outside Haskell comments
- and string literals. To output a literal <literal>#</literal>,
- write it twice: <literal>##</literal>.</para>
-
- <para>Otherwise <literal>#</literal> is followed by optional
- spaces and tabs, an alphanumeric key that describes the
- kind of processing, and its arguments. Arguments look
- like C expressions separated by commas and extend up to the
- nearest unmatched <literal>)</literal>, <literal>]</literal>,
- or <literal>}</literal>, or to the end of line outside any
- <literal>() [] {} '' "" /* */</literal>. Any character may be
- preceded by a backslash and will not be treated specially.</para>
+ <para>All special processing is triggered by
+ the <literal>#</literal> operator. To output
+ a literal <literal>#</literal>, write it twice:
+ <literal>##</literal>. Inside string literals and comments
+ <literal>#</literal> characters are not processed.</para>
+
+ <para>A <literal>#</literal> is followed by optional
+ spaces and tabs, an alphanumeric keyword that describes
+ the kind of processing, and its arguments. Arguments look
+ like C expressions separated by commas (they are not
+ written inside parens). They extend up to the nearest
+ unmatched <literal>)</literal>, <literal>]</literal> or
+ <literal>}</literal>, or to the end of line if it occurs outside
+ any <literal>() [] {} '' "" /**/</literal> and is not preceded
+ by a backslash. Backslash-newline pairs are stripped.</para>
<para>In addition <literal>#{stuff}</literal> is equivalent
to <literal>#stuff</literal> except that it's self-delimited
and thus needs not to be placed at the end of line or in some
brackets.</para>
- <para>Meanings of specific keys:</para>
+ <para>Meanings of specific keywords:</para>
<variablelist>