summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-03-05 14:31:28 +0000
committerIan Lynagh <igloo@earth.li>2009-03-05 14:31:28 +0000
commit43e0bca04009902c16f8f764dcb9a78c8da277c9 (patch)
tree65cf3d7d61c6d015bdb20b54301333da4359fac4 /docs
parentdc055e5ce94940711e5c342afd13d6f5d9bafed4 (diff)
downloadhaskell-43e0bca04009902c16f8f764dcb9a78c8da277c9.tar.gz
Document -fwarn-unrecognised-pragmas; fixes trac #3031
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/flags.xml7
-rw-r--r--docs/users_guide/glasgow_exts.xml2
-rw-r--r--docs/users_guide/using.xml17
3 files changed, 25 insertions, 1 deletions
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml
index 8356a28598..171eaba518 100644
--- a/docs/users_guide/flags.xml
+++ b/docs/users_guide/flags.xml
@@ -1027,6 +1027,13 @@
</row>
<row>
+ <entry><option>-fwarn-unrecognised-pragmas</option></entry>
+ <entry>warn about uses of pragmas that GHC doesn't recognise</entry>
+ <entry>dynamic</entry>
+ <entry><option>-fno-warn-unrecognised-pragmas</option></entry>
+ </row>
+
+ <row>
<entry><option>-fwarn-warnings-deprecations</option></entry>
<entry>warn about uses of functions &amp; types that have warnings or deprecated pragmas</entry>
<entry>dynamic</entry>
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 75ada1d169..b7e8ca4c37 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -6889,7 +6889,7 @@ Assertion failures can be caught, see the documentation for the
<replaceable>word</replaceable>. The various values for
<replaceable>word</replaceable> that GHC understands are described
in the following sections; any pragma encountered with an
- unrecognised <replaceable>word</replaceable> is (silently)
+ unrecognised <replaceable>word</replaceable> is
ignored. The layout rule applies in pragmas, so the closing <literal>#-}</literal>
should start in a column to the right of the opening <literal>{-#</literal>. </para>
diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml
index d6eb6ed301..20bb687b4f 100644
--- a/docs/users_guide/using.xml
+++ b/docs/users_guide/using.xml
@@ -918,6 +918,23 @@ ghc -c Foo.hs</screen>
<variablelist>
<varlistentry>
+ <term><option>-fwarn-unrecognised-pragmas</option>:</term>
+ <listitem>
+ <indexterm><primary><option>-fwarn-unrecognised-pragmas</option></primary>
+ </indexterm>
+ <indexterm><primary>warnings</primary></indexterm>
+ <indexterm><primary>pragmas</primary></indexterm>
+ <para>Causes a warning to be emitted when a
+ pragma that GHC doesn't recognise is used. As well as pragmas
+ that GHC itself uses, GHC also recognises pragmas known to be used
+ by other tools, e.g. <literal>OPTIONS_HUGS</literal> and
+ <literal>DERIVE</literal>.</para>
+
+ <para>This option is on by default.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-fwarn-warnings-deprecations</option>:</term>
<listitem>
<indexterm><primary><option>-fwarn-warnings-deprecations</option></primary>