</varlistentry>
</variablelist>
</sect2>
-
+
<sect2 id="keeping-intermediates">
<title>Keeping Intermediate Files</title>
<indexterm><primary>intermediate files, saving</primary>
an error is reported if the two are inconsistent.
</para></listitem>
-<listitem><para> Just as compiling <filename>A.hs</filename> produces an
-interface file <filename>A.hi</filename>, and an object file
-<filename>A.o</filename>, so compiling <filename>A.hs-boot</filename>
-produces an interface file
-<filename>A.hi-boot</filename>, and an pseudo-object file
-<filename>A.o-boot</filename>:
-<itemizedlist>
-<listitem><para>
-The pseudo-object file <filename>A.o-boot</filename> is empty (don't link it!), but it is
-very useful when using a Makefile, to record when the <filename>A.hi-boot</filename> was
-last brought up to date (see <xref linkend="using-make"/>).
-</para>
-</listitem>
-
- <listitem><para> The <filename>hi-boot</filename> generated by compiling a <filename>hs-boot</filename>
- file is in the same machine-generated binary format as any other
- GHC-generated interface file (e.g. <filename>B.hi</filename>).
- You can display its contents with <command>ghc --show-iface</command>. If you
- specify a directory for interface files, the <option>-ohidir</option> flag, then that affects
- <filename>hi-boot</filename> files too.</para></listitem>b
-</itemizedlist>
-</para></listitem>
+ <listitem>
+ <para> Just as compiling <filename>A.hs</filename> produces an
+ interface file <filename>A.hi</filename>, and an object file
+ <filename>A.o</filename>, so compiling
+ <filename>A.hs-boot</filename> produces an interface file
+ <filename>A.hi-boot</filename>, and an pseudo-object file
+ <filename>A.o-boot</filename>: </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>The pseudo-object file <filename>A.o-boot</filename> is
+ empty (don't link it!), but it is very useful when using a
+ Makefile, to record when the <filename>A.hi-boot</filename> was
+ last brought up to date (see <xref
+ linkend="using-make"/>).</para>
+ </listitem>
+
+ <listitem>
+ <para>The <filename>hi-boot</filename> generated by compiling a
+ <filename>hs-boot</filename> file is in the same
+ machine-generated binary format as any other GHC-generated
+ interface file (e.g. <filename>B.hi</filename>). You can
+ display its contents with <command>ghc
+ --show-iface</command>. If you specify a directory for
+ interface files, the <option>-ohidir</option> flag, then that
+ affects <filename>hi-boot</filename> files
+ too.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
<listitem><para> If hs-boot files are considered distinct from their parent source
files, and if a <literal>{-# SOURCE #-}</literal> import is considered to refer to the
<xref linkend="sec-makefile-dependencies"/></para>
</sect2>
+
<sect2 id="sec-makefile-dependencies">
<title>Dependency generation</title>
<indexterm><primary>dependencies in Makefiles</primary></indexterm>
locate any imported modules that come from packages. The
package modules won't be included in the dependencies
generated, though (but see the
- <option>––include-prelude</option> option below).</para>
+ <option>––include-pkg-deps</option> option below).</para>
<para>The dependency generation phase of GHC can take some
additional options, which you may find useful. For historical
</varlistentry>
<varlistentry>
- <term><option>––include-prelude</option></term>
+ <term><option>––include-pkg-deps</option></term>
<listitem>
<para>Regard modules imported from packages as unstable,
- i.e., generate dependencies on the package modules used
+ i.e., generate dependencies on any imported package modules
(including <literal>Prelude</literal>, and all other
- standard Haskell libraries). This option is normally
+ standard Haskell libraries). Dependencies are not traced
+ recursively into packages; dependencies are only generated for
+ home-package modules on external-package modules directly imported
+ by the home package module.
+ This option is normally
only used by the various system libraries.</para>
</listitem>
</varlistentry>