[commit: ghc] master: user-guide:: Improve -D description (f23b578)
git at git.haskell.org
git at git.haskell.org
Thu Jan 21 13:57:57 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/f23b578f792a357fa754604188eea46ca46cf613/ghc
>---------------------------------------------------------------
commit f23b578f792a357fa754604188eea46ca46cf613
Author: Ben Gamari <ben at smart-cactus.org>
Date: Thu Jan 21 11:36:00 2016 +0100
user-guide:: Improve -D description
>---------------------------------------------------------------
f23b578f792a357fa754604188eea46ca46cf613
docs/users_guide/phases.rst | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst
index 0428956..bc4e90f 100644
--- a/docs/users_guide/phases.rst
+++ b/docs/users_guide/phases.rst
@@ -161,11 +161,14 @@ Options affecting the C pre-processor
large system with significant doses of conditional compilation, you
really shouldn't need it.
-.. ghc-flag:: -D ⟨symbol⟩[=⟨value⟩]
+.. ghc-flag:: -D <symbol>[=<value>]
Define macro ⟨symbol⟩ in the usual way. NB: does *not* affect ``-D``
- macros passed to the C compiler when compiling via C! For those, use
- the ``-optc-Dfoo`` hack… (see :ref:`forcing-options-through`).
+ macros passed to the C compiler when compiling with :ghc-flag:`-fvia-C`! For
+ those, use the ``-optc-Dfoo`` hack… (see :ref:`forcing-options-through`).
+
+ When no value is given, the value is taken to be ``1``. For instance,
+ ``-DUSE_MYLIB`` is equivalent to ``-DUSE_MYLIB=1``.
.. ghc-flag:: -U ⟨symbol⟩
More information about the ghc-commits
mailing list