summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDavid Kraeutmann <kane@kane.cx>2015-07-07 16:59:34 +0200
committerBen Gamari <ben@smart-cactus.org>2015-07-07 16:59:34 +0200
commitf753cf11eb9e310b54b08d9a1ea1d11540d8eb69 (patch)
tree1bafdf4249909d7e80720c01582eeb79444c692b /docs
parentebfc2fb884764eae65df4c5da68d2ad5aaa7b95a (diff)
downloadhaskell-f753cf11eb9e310b54b08d9a1ea1d11540d8eb69.tar.gz
Allow deferred type error warnings to be suppressed
Adds a flag -fwarn-deferred-type-errors similar to -fwarn-typed-holes. Changes the boolean flag of -fdefer-type-errors to a 3-state flag similar to the one used by -fdefer-typed-holes/-fwarn-typed-holes. Test Plan: Since only the absence of deferred type error warnings when -fno-warn-deferred-type-errors is passed has to be tested, I duplicated a test case checking -fdefer-type-errors and adjusted it accordingly. Reviewers: nomeata, simonpj, austin, thomie, bgamari, hvr Reviewed By: nomeata, simonpj, austin, thomie, bgamari, hvr Subscribers: bgamari, simonpj, nomeata, thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D864 GHC Trac Issues: #10283
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/flags.xml13
-rw-r--r--docs/users_guide/glasgow_exts.xml3
-rw-r--r--docs/users_guide/using.xml11
3 files changed, 25 insertions, 2 deletions
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml
index 26822fe110..928c6275b9 100644
--- a/docs/users_guide/flags.xml
+++ b/docs/users_guide/flags.xml
@@ -1497,7 +1497,8 @@
<entry>
Turn type errors into warnings, <link linkend="defer-type-errors">
deferring the error until runtime</link>. Implies
- <option>-fdefer-typed-holes</option>.
+ <option>-fdefer-typed-holes</option>. See also
+ <option>-fwarn-deferred-type-errors</option>
</entry>
<entry>dynamic</entry>
<entry><option>-fno-defer-type-errors</option></entry>
@@ -1804,6 +1805,16 @@
</row>
<row>
+ <entry><option>-fwarn-deferred-type-errors</option></entry>
+ <entry>
+ Report warnings when <link linkend="defer-type-errors">deferred type errors</link>
+ are enabled. This option is enabled by default. See <option>-fdefer-type-errors</option>.
+ </entry>
+ <entry>dynamic</entry>
+ <entry><option>-fno-warn-deferred-type-errors</option></entry>
+ </row>
+
+ <row>
<entry><option>-fwarn-typed-holes</option></entry>
<entry>
Report warnings when <link linkend="typed-holes">typed hole</link>
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 462509290a..95f814f0d0 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -9182,7 +9182,8 @@ main = print "b"
<para>
The flag <literal>-fdefer-type-errors</literal> controls whether type
errors are deferred to runtime. Type errors will still be emitted as
- warnings, but will not prevent compilation.
+ warnings, but will not prevent compilation. You can use
+ <literal>-fno-warn-deferred-type-errors</literal> to suppress these warnings.
</para>
<para>
This flag implies the <literal>-fdefer-typed-holes</literal> flag,
diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml
index 5642ea52c9..58008a2ade 100644
--- a/docs/users_guide/using.xml
+++ b/docs/users_guide/using.xml
@@ -1152,6 +1152,17 @@ test.hs:(5,4)-(6,7):
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-fwarn-type-errors</option>:</term>
+ <listitem>
+ <indexterm><primary><option>-fwarn-type-errors</option></primary>
+ </indexterm>
+ <indexterm><primary>warnings</primary></indexterm>
+ <para>Causes a warning to be reported when a type error is deferred
+ until runtime. See <xref linkend="defer-type-errors"/></para>
+ <para>This warning is on by default.</para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><option>-fdefer-type-errors</option>:</term>