[commit: ghc] wip/merge: Update documentation for "Batch compiler mode" (3d5f67e)

git at git.haskell.org git at git.haskell.org
Wed Nov 19 22:44:49 UTC 2014


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

On branch  : wip/merge
Link       : http://ghc.haskell.org/trac/ghc/changeset/3d5f67e483d340abadbd55cf2c7186cc74cb9ece/ghc

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

commit 3d5f67e483d340abadbd55cf2c7186cc74cb9ece
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Tue Nov 18 22:18:43 2014 -0600

    Update documentation for "Batch compiler mode"
    
    Summary:
    Since commit 7828bf3ea2ea34e7a3a8662f5f621ef706ffee5c
    * --make is the default
    * -c is a mode flag, except when used in combination with --make
    
    Also:
    * -C (generate C code) is only available in unregisterised mode.
    
    Reviewers: austin
    
    Reviewed By: austin
    
    Subscribers: thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D427


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

3d5f67e483d340abadbd55cf2c7186cc74cb9ece
 docs/users_guide/flags.xml |  4 ++--
 docs/users_guide/using.xml | 23 ++++++++++++++++++-----
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml
index 33af295..e8218f7 100644
--- a/docs/users_guide/flags.xml
+++ b/docs/users_guide/flags.xml
@@ -209,8 +209,8 @@
           </row>
           <row>
             <entry><option>-c</option></entry>
-            <entry>Do not link</entry>
-            <entry>dynamic</entry>
+            <entry>Stop after generating object (<literal>.o</literal>) file</entry>
+            <entry>mode</entry>
             <entry>-</entry>
           </row>
           <row>
diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml
index 07d487e..bf4f1c5 100644
--- a/docs/users_guide/using.xml
+++ b/docs/users_guide/using.xml
@@ -246,6 +246,13 @@ module X where
       </varlistentry>
 
       <varlistentry>
+        <term><filename>.hspp</filename></term>
+        <listitem>
+          <para>A file created by the preprocessor.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
         <term><filename>.hi</filename></term>
         <listitem>
           <para>A Haskell interface file, probably
@@ -383,7 +390,7 @@ module X where
         <term>
           <cmdsynopsis>
             <command>ghc -E</command>
-            <command>ghc -c</command>
+            <command>ghc -C</command>
             <command>ghc -S</command>
             <command>ghc -c</command>
           </cmdsynopsis>
@@ -395,10 +402,7 @@ module X where
         <listitem>
           <para>This is the traditional batch-compiler mode, in which
           GHC can compile source files one at a time, or link objects
-          together into an executable.  This mode also applies if
-          there is no other mode flag specified on the command line,
-          in which case it means that the specified files should be
-          compiled and then linked to form a program. See <xref
+          together into an executable. See <xref
           linkend="options-order"/>.</para>
         </listitem>
       </varlistentry>
@@ -617,6 +621,11 @@ ghc Main.hs
       given on the command line and GHC will include them when linking
       the executable.</para>
 
+      <para>For backward compatibility with existing make scripts, when
+      used in combination with <option>-c</option>, the linking phase
+      is omitted (same as <option>--make</option>
+      <option>-no-link</option>).</para>
+
       <para>Note that GHC can only follow dependencies if it has the
       source file available, so if your program includes a module for
       which there is no source file, even if you have an object and an
@@ -765,6 +774,10 @@ ghc -c Foo.hs
       option</primary></indexterm> runs just the pre-processing passes
       of the compiler, dumping the result in a file.</para>
 
+      <para>Note: The option <option>-C</option> is only available when
+      GHC is built in unregisterised mode. See <xref linkend="unreg"/>
+      for more details.</para>
+
       <sect3 id="overriding-suffixes">
         <title>Overriding the default behaviour for a file</title>
 



More information about the ghc-commits mailing list