Remove -fwarn-simple-patterns, and make -fwarn-incomplete-patterns include lambdas
[ghc-hetmet.git] / docs / users_guide / using.xml
index 593781f..7ef2f2f 100644 (file)
@@ -989,7 +989,6 @@ ghc -c Foo.hs</screen>
          suspicious code.  The warnings that are
          <emphasis>not</emphasis> enabled by <option>-Wall</option>
          are
-            <option>-fwarn-simple-patterns</option>,
             <option>-fwarn-tabs</option>,
             <option>-fwarn-incomplete-record-updates</option>,
             <option>-fwarn-monomorphism-restriction</option>,
@@ -1376,28 +1375,6 @@ f "2"    = 2
       </varlistentry>
 
       <varlistentry>
-       <term><option>-fwarn-simple-patterns</option>:</term>
-       <listitem>
-         <indexterm><primary><option>-fwarn-simple-patterns</option></primary>
-         </indexterm>
-         <para>Causes the compiler to warn about lambda-bound
-         patterns that can fail, eg. <literal>\(x:xs)->...</literal>.
-         Normally, these aren't treated as incomplete patterns by
-         <option>-fwarn-incomplete-patterns</option>.</para>
-         <para>&ldquo;Lambda-bound patterns&rdquo; includes all places where there is a single pattern,
-           including list comprehensions and do-notation.  In these cases, a pattern-match 
-           failure is quite legitimate, and triggers filtering (list comprehensions) or
-           the monad <literal>fail</literal> operation (monads). For example:
-           <programlisting>
-             f :: [Maybe a] -> [a]
-             f xs = [y | Just y &lt;- xs]
-             </programlisting>
-           Switching on <option>-fwarn-simple-patterns</option> will elicit warnings about
-           these probably-innocent cases, which is why the flag is off by default. </para>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
        <term><option>-fwarn-tabs</option>:</term>
        <listitem>
          <indexterm><primary><option>-fwarn-tabs</option></primary></indexterm>