[commit: ghc] ghc-8.0: user-guide:: Improve -D description (47b84b6)

git at git.haskell.org git at git.haskell.org
Fri Jan 22 12:19:56 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/47b84b6ce811f5a4be3fcf95e24f384c5cadc09b/ghc

>---------------------------------------------------------------

commit 47b84b6ce811f5a4be3fcf95e24f384c5cadc09b
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Thu Jan 21 11:36:00 2016 +0100

    user-guide:: Improve -D description
    
    (cherry picked from commit f23b578f792a357fa754604188eea46ca46cf613)


>---------------------------------------------------------------

47b84b6ce811f5a4be3fcf95e24f384c5cadc09b
 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