Tidy up -keep* flags
authorIan Lynagh <igloo@earth.li>
Sat, 30 Jun 2007 13:39:44 +0000 (13:39 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 30 Jun 2007 13:39:44 +0000 (13:39 +0000)
compiler/main/DynFlags.hs
docs/users_guide/flags.xml
docs/users_guide/separate_compilation.xml
docs/users_guide/using.xml

index 428d8d4..063f102 100644 (file)
@@ -898,10 +898,15 @@ dynamic_flags = [
   ,  ( "stubdir"       , HasArg (upd . setStubDir . Just))
 
        ------- Keeping temporary files -------------------------------------
-  ,  ( "keep-hc-file"   , AnySuffix (\_ -> setDynFlag Opt_KeepHcFiles))
-  ,  ( "keep-s-file"    , AnySuffix (\_ -> setDynFlag Opt_KeepSFiles))
-  ,  ( "keep-raw-s-file", AnySuffix (\_ -> setDynFlag Opt_KeepRawSFiles))
-  ,  ( "keep-tmp-files" , AnySuffix (\_ -> setDynFlag Opt_KeepTmpFiles))
+     -- These can be singular (think ghc -c) or plural (think ghc --make)
+  ,  ( "keep-hc-file"    , NoArg (setDynFlag Opt_KeepHcFiles))
+  ,  ( "keep-hc-files"   , NoArg (setDynFlag Opt_KeepHcFiles))
+  ,  ( "keep-s-file"     , NoArg (setDynFlag Opt_KeepSFiles))
+  ,  ( "keep-s-files"    , NoArg (setDynFlag Opt_KeepSFiles))
+  ,  ( "keep-raw-s-file" , NoArg (setDynFlag Opt_KeepRawSFiles))
+  ,  ( "keep-raw-s-files", NoArg (setDynFlag Opt_KeepRawSFiles))
+     -- This only makes sense as plural
+  ,  ( "keep-tmp-files"  , NoArg (setDynFlag Opt_KeepTmpFiles))
 
        ------- Miscellaneous ----------------------------------------------
   ,  ( "no-hs-main"     , NoArg (setDynFlag Opt_NoHsMain))
index ba6e895..b84cc22 100644 (file)
          </thead>
          <tbody>
            <row>
-             <entry><option>-keep-hc-file</option></entry>
+             <entry><option>-keep-hc-file</option> or
+                 <option>-keep-hc-files</option></entry>
              <entry>retain intermediate <literal>.hc</literal> files</entry>
              <entry>dynamic</entry>
              <entry>-</entry>
            </row>
            <row>
-             <entry><option>-keep-s-file</option></entry>
+             <entry><option>-keep-s-file</option> or
+                 <option>-keep-s-files</option></entry>
              <entry>retain intermediate <literal>.s</literal> files</entry>
              <entry>dynamic</entry>
              <entry>-</entry>
            </row>
            <row>
-             <entry><option>-keep-raw-s-file</option></entry>
+             <entry><option>-keep-raw-s-file</option> or
+                 <option>-keep-raw-s-files</option></entry>
              <entry>retain intermediate <literal>.raw_s</literal> files</entry>
              <entry>dynamic</entry>
              <entry>-</entry>
index 91cefb4..59723d7 100644 (file)
@@ -436,7 +436,9 @@ $ ghc -c parse/Foo.hs parse/Bar.hs gurgle/Bumble.hs -odir `arch`
       <variablelist>
        <varlistentry>
          <term>
+            <option>-keep-hc-file</option>,
             <option>-keep-hc-files</option>
+            <indexterm><primary><option>-keep-hc-file</option></primary></indexterm>
             <indexterm><primary><option>-keep-hc-files</option></primary></indexterm>
           </term>
          <listitem>
@@ -451,7 +453,9 @@ $ ghc -c parse/Foo.hs parse/Bar.hs gurgle/Bumble.hs -odir `arch`
 
        <varlistentry>
          <term>
+            <option>-keep-s-file</option>,
             <option>-keep-s-files</option>
+            <indexterm><primary><option>-keep-s-file</option></primary></indexterm>
             <indexterm><primary><option>-keep-s-files</option></primary></indexterm>
           </term>
          <listitem>
@@ -461,7 +465,9 @@ $ ghc -c parse/Foo.hs parse/Bar.hs gurgle/Bumble.hs -odir `arch`
 
        <varlistentry>
          <term>
+            <option>-keep-raw-s-file</option>,
             <option>-keep-raw-s-files</option>
+            <indexterm><primary><option>-keep-raw-s-file</option></primary></indexterm>
             <indexterm><primary><option>-keep-raw-s-files</option></primary></indexterm>
           </term>
          <listitem>
index 3ab73a1..f27844d 100644 (file)
@@ -81,7 +81,7 @@ module X where
       <para>It is not recommended to move all the contents of your
       Makefiles into your source files, but in some circumstances, the
       <literal>OPTIONS_GHC</literal> pragma is the Right Thing. (If you
-      use <option>-keep-hc-file-too</option> and have OPTION flags in
+      use <option>-keep-hc-file</option> and have OPTION flags in
       your module, the OPTIONS_GHC will get put into the generated .hc
       file).</para>
     </sect2>