Make -fext-core a dynamic flag (it was a static flag)
authorIan Lynagh <igloo@earth.li>
Sun, 5 Jul 2009 13:24:20 +0000 (13:24 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 5 Jul 2009 13:24:20 +0000 (13:24 +0000)
compiler/coreSyn/MkExternalCore.lhs
compiler/main/DynFlags.hs
compiler/main/StaticFlagParser.hs
compiler/main/StaticFlags.hs
docs/users_guide/flags.xml

index 0cfb787..fc49c2b 100644 (file)
@@ -26,7 +26,6 @@ import Outputable
 import Encoding
 import ForeignCall
 import DynFlags
-import StaticFlags
 import FastString
 
 import IO
@@ -34,7 +33,7 @@ import Data.Char
 
 emitExternalCore :: DynFlags -> CgGuts -> IO ()
 emitExternalCore dflags cg_guts
- | opt_EmitExternalCore 
+ | dopt Opt_EmitExternalCore dflags
  = (do handle <- openFile corename WriteMode
        hPutStrLn handle (show (mkExternalCore cg_guts))      
        hClose handle)
index 394965a..e39bff3 100644 (file)
@@ -309,6 +309,7 @@ data DynFlag
    | Opt_PrintBindContents
    | Opt_GenManifest
    | Opt_EmbedManifest
+   | Opt_EmitExternalCore
 
        -- temporary flags
    | Opt_RunCPS
@@ -1740,6 +1741,7 @@ fFlags = [
     deprecatedForLanguage "IncoherentInstances" ),
   ( "gen-manifest",                     Opt_GenManifest, const Supported ),
   ( "embed-manifest",                   Opt_EmbedManifest, const Supported ),
+  ( "ext-core",                         Opt_EmitExternalCore, const Supported ),
   ( "implicit-import-qualified",        Opt_ImplicitImportQualified, const Supported )
   ]
 
index ae7b00d..f3d737c 100644 (file)
@@ -167,7 +167,6 @@ isStaticFlag f =
     "static",
     "fhardwire-lib-paths",
     "funregisterised",
-    "fext-core",
     "fcpr-off",
     "ferror-spans",
     "fPIC",
index d3b7cb4..3660d37 100644 (file)
@@ -68,7 +68,6 @@ module StaticFlags (
        opt_HistorySize,
        opt_OmitBlackHoling,
        opt_Unregisterised,
-       opt_EmitExternalCore,
        v_Ld_inputs,
        tablesNextToCode,
         opt_StubDeadValues,
@@ -281,9 +280,6 @@ tablesNextToCode :: Bool
 tablesNextToCode               = not opt_Unregisterised
                                  && cGhcEnableTablesNextToCode == "YES"
 
-opt_EmitExternalCore :: Bool
-opt_EmitExternalCore           = lookUp  (fsLit "-fext-core")
-
 -- Include full span info in error messages, instead of just the start position.
 opt_ErrorSpans :: Bool
 opt_ErrorSpans                 = lookUp (fsLit "-ferror-spans")
index a914610..bfffb09 100644 (file)
            <row>
              <entry><option>-fext-core</option></entry>
              <entry>Generate <filename>.hcr</filename> external Core files</entry>
-             <entry>static</entry>
+             <entry>dynamic</entry>
              <entry>-</entry>
            </row>
          </tbody>