[project @ 2003-03-11 12:26:14 by stolz]
[ghc-hetmet.git] / ghc / docs / users_guide / separate_compilation.sgml
index a07c3ee..42abfee 100644 (file)
@@ -297,7 +297,7 @@ OBJS = Main.o   Foo.o   Bar.o
 .SUFFIXES : .o .hs .hi .lhs .hc .s
 
 cool_pgm : $(OBJS)
-        rm $@
+        rm -f $@
         $(HC) -o $@ $(HC_OPTS) $(OBJS)
 
 # Standard suffix rules
@@ -618,12 +618,22 @@ newtype TA = MkTA GHC.Base.Int
          particular, most <literal>Prelude</literal> entities aren't
          actually defined in the <literal>Prelude</literal> (see for
          example <literal>GHC.Base.Int</literal> in the above
-         example).</para>
+         example).  HINT: to find out the fully-qualified name for
+         entities in the <literal>Prelude</literal> (or anywhere for
+         that matter), try using GHCi's
+         <literal>:info</literal> command, eg.</para>
+<programlisting>Prelude> :m -Prelude
+> :i IO.IO
+-- GHC.IOBase.IO is a type constructor
+newtype GHC.IOBase.IO a
+...</programlisting>
        </listitem>
        <listitem>
          <para>Only <literal>data</literal>, <literal>type</literal>,
          <literal>newtype</literal>, <literal>class</literal>, and
-         type signature declarations may be included.</para>
+         type signature declarations may be included. You cannot declare
+         <literal>instances</literal> or derive them automatically.
+</para>
        </listitem>
       </itemizedlist>
 
@@ -707,9 +717,12 @@ every orphan module below the module being compiled.  This is usually
 wasted work, but there is no avoiding it.  You should therefore do
 your best to have as few orphan modules as possible.
 
-</para><para>
-You can identify an orphan module by looking in its interface file, M.hi.  If there is a ``!'' on
-the first line, GHC considers it an orphan module. 
+</para>
+
+<para> You can identify an orphan module by looking in its interface
+file, <filename>M.hi</filename>, using the
+<option>--show-iface</option>.  If there is a ``!'' on the first line,
+GHC considers it an orphan module.
 </para>
 </sect2>