diff options
author | Ian Lynagh <igloo@earth.li> | 2008-06-16 14:29:17 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-06-16 14:29:17 +0000 |
commit | 0f5e104c36b1dc3d8deeec5fef3d65e7b3a1b5ad (patch) | |
tree | cb2319df6f3669fd22e95029a0de98cd308feec4 /docs | |
parent | 1363f4121ceaa38ac50eac42381b976f89d5ea96 (diff) | |
download | haskell-0f5e104c36b1dc3d8deeec5fef3d65e7b3a1b5ad.tar.gz |
More commandline flag improvements
* Allow -ffoo flags to be deprecated
* Mark some -ffoo flags as deprecated
* Avoid using deprecated flags in error messages, in the build system, etc
* Add a flag to en/disable the deprecated flag warning
Diffstat (limited to 'docs')
-rw-r--r-- | docs/comm/exts/ndp.html | 6 | ||||
-rw-r--r-- | docs/users_guide/bugs.xml | 2 | ||||
-rw-r--r-- | docs/users_guide/ffi-chap.xml | 7 | ||||
-rw-r--r-- | docs/users_guide/flags.xml | 11 | ||||
-rw-r--r-- | docs/users_guide/glasgow_exts.xml | 4 | ||||
-rw-r--r-- | docs/users_guide/gone_wrong.xml | 2 | ||||
-rw-r--r-- | docs/users_guide/using.xml | 18 |
7 files changed, 34 insertions, 16 deletions
diff --git a/docs/comm/exts/ndp.html b/docs/comm/exts/ndp.html index 0c94c3960b..2c79d728d5 100644 --- a/docs/comm/exts/ndp.html +++ b/docs/comm/exts/ndp.html @@ -32,8 +32,8 @@ <h2>More Sugar: Special Syntax for Array Comprehensions</h2> <p> - The option <code>-fparr</code>, which is a dynamic hsc option that can - be reversed with <code>-fno-parr</code>, enables special syntax for + The option <code>-XParr</code>, which is a dynamic hsc option that can + be reversed with <code>-XNoParr</code>, enables special syntax for parallel arrays, which is not essential to using parallel arrays, but makes for significantly more concise programs. The switch works by making the lexical analyser (located in <a @@ -326,7 +326,7 @@ mapFilterP :: (a -> Maybe b) -> [:a:] -> [:b:]</pre> flattening (just like profiling does), there is a <em>compiler way</em> <code>"ndp"</code>, which can be selected using the way option code <code>-ndp</code>. This option will automagically select - <code>-fparr</code> and <code>-fflatten</code>. + <code>-XParr</code> and <code>-fflatten</code>. <h4><code>FlattenMonad</code></h4> <p> diff --git a/docs/users_guide/bugs.xml b/docs/users_guide/bugs.xml index 50ffb399a4..fdeeaa87cc 100644 --- a/docs/users_guide/bugs.xml +++ b/docs/users_guide/bugs.xml @@ -98,7 +98,7 @@ main = do args <- getArgs <para>GHC's typechecker makes all pattern bindings monomorphic by default; this behaviour can be disabled with - <option>-fno-mono-pat-binds</option>. See <xref + <option>-XNoMonoPatBinds</option>. See <xref linkend="options-language" />.</para> </sect3> diff --git a/docs/users_guide/ffi-chap.xml b/docs/users_guide/ffi-chap.xml index 49896b92e0..12aea555df 100644 --- a/docs/users_guide/ffi-chap.xml +++ b/docs/users_guide/ffi-chap.xml @@ -9,11 +9,8 @@ Foreign function interface (FFI) <para>GHC (mostly) conforms to the Haskell 98 Foreign Function Interface Addendum 1.0, whose definition is available from <ulink url="http://www.haskell.org/"><literal>http://www.haskell.org/</literal></ulink>.</para> - <para>To enable FFI support in GHC, give the <option>-fffi</option><indexterm><primary><option>-fffi</option></primary> - </indexterm> flag, or -the <option>-fglasgow-exts</option><indexterm><primary><option>-fglasgow-exts</option></primary> - </indexterm> flag which implies <option>-fffi</option> -.</para> + <para>To enable FFI support in GHC, give the <option>-XForeignFunctionInterface</option><indexterm><primary><option>-XForeignFunctionInterface</option></primary> + </indexterm> flag.</para> <para>GHC implements a number of GHC-specific extensions to the FFI Addendum. These extensions are described in <xref linkend="ffi-ghcexts" />, but please note that programs using diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml index 9b1e272d9b..8da67f887c 100644 --- a/docs/users_guide/flags.xml +++ b/docs/users_guide/flags.xml @@ -881,10 +881,10 @@ <entry><option>-XNoRecordWildCards</option></entry> </row> <row> - <entry><option>-XRecordPuns</option></entry> + <entry><option>-XNamedFieldPuns</option></entry> <entry>Enable <link linkend="record-puns">record puns</link>.</entry> <entry>dynamic</entry> - <entry><option>-XNoRecordPuns</option></entry> + <entry><option>-XNoNamedFieldPuns</option></entry> </row> <row> <entry><option>-XDisambiguateRecordFields</option></entry> @@ -1012,6 +1012,13 @@ </row> <row> + <entry><option>-fwarn-deprecated-flags</option></entry> + <entry>warn about uses of commandline flags that are deprecated</entry> + <entry>dynamic</entry> + <entry><option>-fno-warn-deprecated-flags</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/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 6b8a20b486..a100e43e77 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -1410,7 +1410,7 @@ records from different modules that use the same field name. </title> <para> -Record puns are enabled by the flag <literal>-XRecordPuns</literal>. +Record puns are enabled by the flag <literal>-XNamedFieldPuns</literal>. </para> <para> @@ -3269,7 +3269,7 @@ corresponding type in the instance declaration. These restrictions ensure that context reduction terminates: each reduction step makes the problem smaller by at least one constructor. Both the Paterson Conditions and the Coverage Condition are lifted -if you give the <option>-fallow-undecidable-instances</option> +if you give the <option>-XUndecidableInstances</option> flag (<xref linkend="undecidable-instances"/>). You can find lots of background material about the reason for these restrictions in the paper <ulink diff --git a/docs/users_guide/gone_wrong.xml b/docs/users_guide/gone_wrong.xml index ce778f2ebe..619d8acd90 100644 --- a/docs/users_guide/gone_wrong.xml +++ b/docs/users_guide/gone_wrong.xml @@ -55,7 +55,7 @@ example, if it picks up a non-standard <filename>Prelude.hi</filename> file, pretty terrible things will happen. If you turn on - <option>-fno-implicit-prelude</option><indexterm><primary>-fno-implicit-prelude + <option>-XNoImplicitPrelude</option><indexterm><primary>-XNoImplicitPrelude option</primary></indexterm>, the compiler will almost surely die, unless you know what you are doing.</para> diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index 21e5205022..ef62d59118 100644 --- a/docs/users_guide/using.xml +++ b/docs/users_guide/using.xml @@ -842,6 +842,7 @@ ghc -c Foo.hs</screen> program. These are: <option>-fwarn-overlapping-patterns</option>, <option>-fwarn-deprecations</option>, + <option>-fwarn-deprecated-flags</option>, <option>-fwarn-duplicate-exports</option>, <option>-fwarn-missing-fields</option>, and <option>-fwarn-missing-methods</option>. The following flags are @@ -931,6 +932,19 @@ ghc -c Foo.hs</screen> </varlistentry> <varlistentry> + <term><option>-fwarn-deprecated-flags</option>:</term> + <listitem> + <indexterm><primary><option>-fwarn-deprecated-flags</option></primary> + </indexterm> + <indexterm><primary>deprecated-flags</primary></indexterm> + <para>Causes a warning to be emitted when a deprecated + commandline flag is used.</para> + + <para>This option is on by default.</para> + </listitem> + </varlistentry> + + <varlistentry> <term><option>-fwarn-dodgy-imports</option>:</term> <listitem> <indexterm><primary><option>-fwarn-dodgy-imports</option></primary> @@ -982,11 +996,11 @@ ghc -c Foo.hs</screen> imported. This happens unless either the Prelude module is explicitly imported with an <literal>import ... Prelude ...</literal> line, or this implicit import is disabled (either by - <option>-fno-implicit-prelude</option> or a + <option>-XNoImplicitPrelude</option> or a <literal>LANGUAGE NoImplicitPrelude</literal> pragma).</para> <para>Note that no warning is given for syntax that implicitly - refers to the Prelude, even if <option>-fno-implicit-prelude</option> + refers to the Prelude, even if <option>-XNoImplicitPrelude</option> would change whether it refers to the Prelude. For example, no warning is given when <literal>368</literal> means |