has been specified, then the object filename is
<replaceable>dir</replaceable>/<replaceable>mod</replaceable>.<replaceable>osuf</replaceable>,
where <replaceable>mod</replaceable> is the module name with
- dots replaced by slashes.</para>
+ dots replaced by slashes. GHC will silently create the necessary directory
+ structure underneath <replaceable>dir</replaceable>, if it does not
+ already exist.</para>
</listitem>
</itemizedlist>
<variablelist>
<varlistentry>
<term>
+ <option>-keep-hc-file</option>,
<option>-keep-hc-files</option>
+ <indexterm><primary><option>-keep-hc-file</option></primary></indexterm>
<indexterm><primary><option>-keep-hc-files</option></primary></indexterm>
</term>
<listitem>
<varlistentry>
<term>
+ <option>-keep-s-file</option>,
<option>-keep-s-files</option>
+ <indexterm><primary><option>-keep-s-file</option></primary></indexterm>
<indexterm><primary><option>-keep-s-files</option></primary></indexterm>
</term>
<listitem>
<varlistentry>
<term>
+ <option>-keep-raw-s-file</option>,
<option>-keep-raw-s-files</option>
+ <indexterm><primary><option>-keep-raw-s-file</option></primary></indexterm>
<indexterm><primary><option>-keep-raw-s-files</option></primary></indexterm>
</term>
<listitem>
<variablelist>
<varlistentry>
<term>
- <option>-no-recomp</option>
- <indexterm><primary><option>-recomp</option></primary></indexterm>
- <indexterm><primary><option>-no-recomp</option></primary></indexterm>
+ <option>-fforce-recomp</option>
+ <indexterm><primary><option>-fforce-recomp</option></primary></indexterm>
+ <indexterm><primary><option>-fno-force-recomp</option></primary></indexterm>
</term>
<listitem>
<para>Turn off recompilation checking (which is on by
it out precisely as in its real definition.</para>
<para>
If you do not write out the constructors, you may need to give a kind
- annotation (<xref linkend="sec-kinding"/>), to tell
+ annotation (<xref linkend="kinding"/>), to tell
GHC the kind of the type variable, if it is not "*". (In source files, this is worked out
from the way the type variable is used in the constructors.) For example:
<programlisting>
data R (x :: * -> *) y
</programlisting>
+You cannot use <literal>deriving</literal> on a data type declaration; write in
+<literal>instance</literal> declaration instead.
</para></listitem>
<listitem><para> Class declarations is exactly as in Haskell, except that you may not put
-default method declarations. You can also omit all the class methods entirely.
+default method declarations. You can also omit all the superclasses and class
+methods entirely; but you must either omit them all or put them all in.
</para></listitem>
-<listitem><para> Do not include instance declarations. There is a complication to do with
-how the dictionary functions are named. It may well work, but it's not a well-tested feature.
+<listitem><para> You can include instance declarations just as in Haskell; but omit the "where" part.
</para></listitem>
</itemizedlist>
</para>
<literal>make</literal> looks for a rule to do so; one of the
preceding suffix rules does the job nicely. These dependencies
can be generated automatically by <command>ghc</command>; see
- <xref linkend="sec-makefile-dependencies"/></para>
+ <xref linkend="makefile-dependencies"/></para>
</sect2>
- <sect2 id="sec-makefile-dependencies">
+ <sect2 id="makefile-dependencies">
<title>Dependency generation</title>
<indexterm><primary>dependencies in Makefiles</primary></indexterm>
<indexterm><primary>Makefile dependencies</primary></indexterm>
<variablelist>
<varlistentry>
+ <term><option>-ddump-mod-cycles</option></term>
+ <listitem>
+ <para>Display a list of the cycles in the module graph. This is
+ useful when trying to eliminate such cycles. You do not need the <literal>-optdep</literal> prefix
+ for this flag.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-w</option></term>
<listitem>
<para>Turn off warnings about interface file shadowing.</para>
</listitem>
</varlistentry>
+<!-- Not currently implemented:
<varlistentry>
<term><option>––exclude-directory=<dirs></option></term>
<listitem>
the <option>––exclude-directory</option> option.</para>
</listitem>
</varlistentry>
+-->
<varlistentry>
<term><option>––include-pkg-deps</option></term>