merge GHC HEAD
[ghc-hetmet.git] / docs / users_guide / using.xml
index 34f769a..df01521 100644 (file)
@@ -783,18 +783,6 @@ ghc -c Foo.hs</screen>
     <variablelist>
       <varlistentry>
        <term>
-          <option>-n</option>
-          <indexterm><primary><option>-n</option></primary></indexterm>
-        </term>
-       <listitem>
-         <para>Does a dry-run, i.e. GHC goes through all the motions
-          of compiling as normal, but does not actually run any
-          external commands.</para>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>
           <option>-v</option>
           <indexterm><primary><option>-v</option></primary></indexterm>
         </term>
@@ -1300,6 +1288,39 @@ f foo = foo { x = 6 }
       </varlistentry>
 
       <varlistentry>
+       <term>
+          <option>-fwarn-missing-import-lists</option>:
+         <indexterm><primary><option>-fwarn-import-lists</option></primary></indexterm>
+         <indexterm><primary>missing import lists, warning</primary></indexterm>
+         <indexterm><primary>import lists, missing</primary></indexterm>
+        </term>
+       <listitem>
+
+         <para>This flag warns if you use an unqualified 
+            <literal>import</literal> declaration
+           that does not explicitly list the entities brought into scope. For 
+           example
+      </para>
+<programlisting>
+module M where
+  import X( f )
+  import Y
+  import qualified Z
+  p x = f x x
+</programlisting>
+        <para>
+          The <option>-fwarn-import-lists</option> flag will warn about the import
+         of <literal>Y</literal> but not <literal>X</literal>
+         If module <literal>Y</literal> is later changed to export (say) <literal>f</literal>,
+          then the reference to <literal>f</literal> in <literal>M</literal> will become
+         ambiguous.  No warning is produced for the import of <literal>Z</literal>
+         because extending <literal>Z</literal>'s exports would be unlikely to produce
+         ambiguity in <literal>M</literal>.
+        </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
        <term><option>-fwarn-missing-methods</option>:</term>
        <listitem>
          <indexterm><primary><option>-fwarn-missing-methods</option></primary></indexterm>
@@ -1340,6 +1361,20 @@ f foo = foo { x = 6 }
       </varlistentry>
 
       <varlistentry>
+       <term><option>-fwarn-missing-local-sigs</option>:</term>
+       <listitem>
+         <indexterm><primary><option>-fwarn-missing-local-sigs</option></primary></indexterm>
+         <indexterm><primary>type signatures, missing</primary></indexterm>
+
+         <para>If you use the
+          <option>-fwarn-missing-local-sigs</option> flag GHC will warn
+          you about any polymorphic local bindings. As part of
+           the warning GHC also reports the inferred type. The
+          option is off by default.</para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
        <term><option>-fwarn-name-shadowing</option>:</term>
        <listitem>
          <indexterm><primary><option>-fwarn-name-shadowing</option></primary></indexterm>
@@ -1668,7 +1703,7 @@ f "2"    = 2
       <para>We don't use a <option>-O*</option> flag for day-to-day
       work.  We use <option>-O</option> to get respectable speed;
       e.g., when we want to measure something.  When we want to go for
-      broke, we tend to use <option>-O2 -fvia-C</option> (and we go for
+      broke, we tend to use <option>-O2</option> (and we go for
       lots of coffee breaks).</para>
 
       <para>The easiest way to see what <option>-O</option> (etc.)
@@ -2170,27 +2205,6 @@ f "2"    = 2
         </listitem>
       </varlistentry>
 
-      <varlistentry>
-       <term><option>-monly-[32]-regs</option>:</term>
-       <listitem>
-         <para>(x86 only)<indexterm><primary>-monly-N-regs
-          option (iX86 only)</primary></indexterm> GHC tries to
-          &ldquo;steal&rdquo; four registers from GCC, for performance
-          reasons; it almost always works.  However, when GCC is
-          compiling some modules with four stolen registers, it will
-          crash, probably saying:
-
-<screen>
-Foo.hc:533: fixed or forbidden register was spilled.
-This may be due to a compiler bug or to impossible asm
-statements or clauses.
-</screen>
-
-          Just give some registers back with
-          <option>-monly-N-regs</option>.  Try `3' first, then `2'.
-          If `2' doesn't work, please report the bug to us.</para>
-       </listitem>
-      </varlistentry>
     </variablelist>
 
   </sect1>