summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2013-01-02 11:57:00 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2013-01-02 11:57:00 +0000
commit5a6a223f855538112ec9d089425e34853fb3542b (patch)
treedace13f28eddfe68fb5c16bfe6d46c7a9494a018 /docs
parent302172f4959b92fa668db6b460921e710bdf6655 (diff)
downloadhaskell-5a6a223f855538112ec9d089425e34853fb3542b.tar.gz
Add flag -fwarn-duplicate-constraints
This fixes Trac #7541, and is on by default. Use -fno-warn-duplicate-constraints to switch it off.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/flags.xml7
-rw-r--r--docs/users_guide/using.xml19
2 files changed, 26 insertions, 0 deletions
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml
index 2103260671..e084315586 100644
--- a/docs/users_guide/flags.xml
+++ b/docs/users_guide/flags.xml
@@ -1236,6 +1236,13 @@
</row>
<row>
+ <entry><option>-fwarn-duplicate-constraints</option></entry>
+ <entry>warn when a constraint appears duplicated in a type signature</entry>
+ <entry>dynamic</entry>
+ <entry><option>-fno-warn-duplicate-constraints</option></entry>
+ </row>
+
+ <row>
<entry><option>-fwarn-duplicate-exports</option></entry>
<entry>warn when an entity is exported multiple times</entry>
<entry>dynamic</entry>
diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml
index 292f4fe1c0..adc3694320 100644
--- a/docs/users_guide/using.xml
+++ b/docs/users_guide/using.xml
@@ -950,6 +950,7 @@ test.hs:(5,4)-(6,7):
<option>-fwarn-overlapping-patterns</option>,
<option>-fwarn-warnings-deprecations</option>,
<option>-fwarn-deprecated-flags</option>,
+ <option>-fwarn-duplicate-constraints</option>,
<option>-fwarn-duplicate-exports</option>,
<option>-fwarn-missing-fields</option>,
<option>-fwarn-missing-methods</option>,
@@ -1195,6 +1196,24 @@ foreign import "&amp;f" f :: FunPtr t
</varlistentry>
<varlistentry>
+ <term><option>-fwarn-duplicate-constraints</option>:</term>
+ <listitem>
+ <indexterm><primary><option>-fwarn-duplicate-constraints</option></primary></indexterm>
+ <indexterm><primary>duplicate constraints, warning</primary></indexterm>
+
+ <para>Have the compiler warn about duplicate constraints in a type signature. For
+ example
+ <programlisting>
+ f :: (Eq a, Show a, Eq a) => a -> a
+ </programlisting>
+ The warning will indicate the duplicated <literal>Eq a</literal> constraint.
+ </para>
+
+ <para>This option is on by default.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-fwarn-duplicate-exports</option>:</term>
<listitem>
<indexterm><primary><option>-fwarn-duplicate-exports</option></primary></indexterm>