summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krz.gogolewski@gmail.com>2018-07-12 10:08:14 -0400
committerBen Gamari <ben@smart-cactus.org>2018-07-12 15:04:20 -0400
commitf282f02d9d3b190244b6cf4a0cb1bb88816cae84 (patch)
tree1fc4647bf1f38bc70ab762e6f5fc1d1667a9e337
parent2b1adaa7817c453df868d928312a9a99a0481eb1 (diff)
downloadhaskell-f282f02d9d3b190244b6cf4a0cb1bb88816cae84.tar.gz
docs: remove leftovers of static flags
Remove "dynamic + :set" category from documentation, because all dynamic flags support ":set"; this is a leftover of "static + :set". Test Plan: make html Reviewers: bgamari, mpickering Reviewed By: mpickering Subscribers: mpickering, osa1, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4942
-rw-r--r--docs/users_guide/flags.py4
-rw-r--r--docs/users_guide/flags.rst4
-rw-r--r--docs/users_guide/packages.rst14
-rw-r--r--docs/users_guide/phases.rst2
-rw-r--r--docs/users_guide/safe_haskell.rst6
-rw-r--r--docs/users_guide/separate_compilation.rst4
-rw-r--r--docs/users_guide/using.rst30
7 files changed, 29 insertions, 35 deletions
diff --git a/docs/users_guide/flags.py b/docs/users_guide/flags.py
index cc30b8c066..a70f7fef1e 100644
--- a/docs/users_guide/flags.py
+++ b/docs/users_guide/flags.py
@@ -5,7 +5,7 @@
#
# .. ghc-flag::
# :shortdesc: A short description (REQUIRED)
-# :type: dynamic, mode, dynamix/ ``:set`` (REQUIRED)
+# :type: dynamic or mode (REQUIRED)
# :reverse: The reverse of the flag
# :category: The category to list the flag under (default: 'misc')
# :noindex: Do not list the flag anywhere (good for duplicates)
@@ -109,6 +109,8 @@ class GenericFlag(GenericObject):
type_node = nodes.paragraph()
reverse_node = nodes.paragraph()
+ assert flag_type in ('dynamic', 'mode'), ('Unknown flag type for %s: %s' %
+ (name_string, flag_type))
# Nodes expect an internal ViewList type for the content,
# we are just spoofing it here
diff --git a/docs/users_guide/flags.rst b/docs/users_guide/flags.rst
index 2d5d5c4a95..5c2e7ae072 100644
--- a/docs/users_guide/flags.rst
+++ b/docs/users_guide/flags.rst
@@ -4,8 +4,8 @@ Flag reference
==============
This section is a quick-reference for GHC's command-line flags. For each
-flag, we also list its static/dynamic status (see
-:ref:`static-dynamic-flags`), and the flag's opposite (if available).
+flag, we also list its mode/dynamic status (see
+:ref:`mode-dynamic-flags`), and the flag's opposite (if available).
Verbosity options
-----------------
diff --git a/docs/users_guide/packages.rst b/docs/users_guide/packages.rst
index e31abc06a6..7a54b4a8bf 100644
--- a/docs/users_guide/packages.rst
+++ b/docs/users_guide/packages.rst
@@ -129,7 +129,7 @@ The GHC command line options that control packages are:
.. ghc-flag:: -package ⟨pkg⟩
:shortdesc: Expose package ⟨pkg⟩
- :type: dynamic/ ``:set``
+ :type: dynamic
:category:
This option causes the installed package ⟨pkg⟩ to be exposed. The
@@ -181,7 +181,7 @@ The GHC command line options that control packages are:
.. ghc-flag:: -package-id ⟨unit-id⟩
:shortdesc: Expose package by id ⟨unit-id⟩
- :type: dynamic/ ``:set``
+ :type: dynamic
:category:
Exposes a package like :ghc-flag:`-package ⟨pkg⟩`, but the package is named
@@ -209,7 +209,7 @@ The GHC command line options that control packages are:
.. ghc-flag:: -hide-package ⟨pkg⟩
:shortdesc: Hide package ⟨pkg⟩
- :type: dynamic/ ``:set``
+ :type: dynamic
:category:
This option does the opposite of :ghc-flag:`-package ⟨pkg⟩`: it causes the
@@ -222,7 +222,7 @@ The GHC command line options that control packages are:
.. ghc-flag:: -ignore-package ⟨pkg⟩
:shortdesc: Ignore package ⟨pkg⟩
- :type: dynamic/ ``:set``
+ :type: dynamic
:category:
Causes the compiler to behave as if package ⟨pkg⟩, and any packages
@@ -257,7 +257,7 @@ The GHC command line options that control packages are:
.. ghc-flag:: -trust ⟨pkg⟩
:shortdesc: Expose package ⟨pkg⟩ and set it to be trusted
- :type: dynamic/ ``:set``
+ :type: dynamic
:category:
:noindex:
@@ -269,7 +269,7 @@ The GHC command line options that control packages are:
.. ghc-flag:: -distrust ⟨pkg⟩
:shortdesc: Expose package ⟨pkg⟩ and set it to be distrusted
- :type: dynamic/ ``:set``
+ :type: dynamic
:category:
:noindex:
@@ -281,7 +281,7 @@ The GHC command line options that control packages are:
.. ghc-flag:: -distrust-all-packages
:shortdesc: Distrust all packages by default
- :type: dynamic/ ``:set``
+ :type: dynamic
:category:
:noindex:
diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst
index 27948e7092..f8fe8d1857 100644
--- a/docs/users_guide/phases.rst
+++ b/docs/users_guide/phases.rst
@@ -678,7 +678,7 @@ for example).
.. ghc-flag:: -package ⟨name⟩
:shortdesc: Expose package ⟨pkg⟩
- :type: dynamic/ ``:set``
+ :type: dynamic
:category: linking
If you are using a Haskell "package" (see :ref:`packages`), don't
diff --git a/docs/users_guide/safe_haskell.rst b/docs/users_guide/safe_haskell.rst
index 014f4efc43..adf70d2a90 100644
--- a/docs/users_guide/safe_haskell.rst
+++ b/docs/users_guide/safe_haskell.rst
@@ -582,7 +582,7 @@ trust property of packages:
.. ghc-flag:: -trust ⟨pkg⟩
:shortdesc: Expose package ⟨pkg⟩ and set it to be trusted. See
:ref:`safe-haskell`.
- :type: dynamic/ ``:set``
+ :type: dynamic
:category: packages
Exposes package ⟨pkg⟩ if it was hidden and considers it a
@@ -591,7 +591,7 @@ trust property of packages:
.. ghc-flag:: -distrust ⟨pkg⟩
:shortdesc: Expose package ⟨pkg⟩ and set it to be distrusted. See
:ref:`safe-haskell`.
- :type: dynamic/ ``:set``
+ :type: dynamic
:category: packages
Exposes package ⟨pkg⟩ if it was hidden and considers it
@@ -599,7 +599,7 @@ trust property of packages:
.. ghc-flag:: -distrust-all-packages
:shortdesc: Distrust all packages by default. See :ref:`safe-haskell`.
- :type: dynamic/ ``:set``
+ :type: dynamic
:category: packages
Considers all packages distrusted unless they are
diff --git a/docs/users_guide/separate_compilation.rst b/docs/users_guide/separate_compilation.rst
index e7501c2716..71a1a46d1b 100644
--- a/docs/users_guide/separate_compilation.rst
+++ b/docs/users_guide/separate_compilation.rst
@@ -159,7 +159,7 @@ contents of the search path:
.. ghc-flag:: -i⟨dir⟩[:⟨dir⟩]*
:shortdesc: add ⟨dir⟩, ⟨dir2⟩, etc. to import path
- :type: dynamic/ ``:set``
+ :type: dynamic
:category: search-path
.. index::
@@ -170,7 +170,7 @@ contents of the search path:
.. ghc-flag:: -i
:shortdesc: Empty the import directory list
- :type: dynamic/ ``:set``
+ :type: dynamic
:category: search-path
resets the search path back to nothing.
diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst
index 4c98e08b4f..9ec26f2bb2 100644
--- a/docs/users_guide/using.rst
+++ b/docs/users_guide/using.rst
@@ -130,7 +130,7 @@ possible to do this directly in the source file using the
``OPTIONS_GHC`` is a *file-header pragma* (see :ref:`options-pragma`).
Only *dynamic* flags can be used in an ``OPTIONS_GHC`` pragma (see
-:ref:`static-dynamic-flags`).
+:ref:`mode-dynamic-flags`).
Note that your command shell does not get to the source file options,
they are just included literally in the array of command-line arguments
@@ -153,37 +153,29 @@ Setting options in GHCi
Options may also be modified from within GHCi, using the :ghci-cmd:`:set`
command.
-.. _static-dynamic-flags:
+.. _mode-dynamic-flags:
-Static, Dynamic, and Mode options
----------------------------------
+Dynamic and Mode options
+------------------------
.. index::
- single: static; options
single: dynamic; options
single: mode; options
-Each of GHC's command line options is classified as static, dynamic or
-mode:
+Each of GHC's command line options is classified as dynamic or mode:
- For example, :ghc-flag:`--make` or :ghc-flag:`-E`. There may only be a single mode
- flag on the command line. The available modes are listed in
- :ref:`modes`.
+ Mode: A mode may be used on the command line only.
+ You can pass only one mode flag.
+ For example, :ghc-flag:`--make` or :ghc-flag:`-E`.
+ The available modes are listed in :ref:`modes`.
- Most non-mode flags fall into this category. A dynamic flag may be
- used on the command line, in a ``OPTIONS_GHC`` pragma in a source
+ Dynamic: A dynamic flag may be used on the command line,
+ in a ``OPTIONS_GHC`` pragma in a source
file, or set using :ghci-cmd:`:set` in GHCi.
- A few flags are "static", which means they can only be used on the
- command-line, and remain in force over the entire GHC/GHCi run.
-
The flag reference tables (:ref:`flag-reference`) lists the status of
each flag.
-There are a few flags that are static except that they can also be used
-with GHCi's :ghci-cmd:`:set` command; these are listed as “static/\ ``:set``\ ”
-in the table.
-
.. _file-suffixes:
Meaningful file suffixes