[commit: ghc] master: Delete old comments referring to newSession (4a14326)

git at git.haskell.org git
Wed Oct 2 05:54:44 UTC 2013


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/4a143260e3c00937a97d0f49e466953a742a77d5/ghc

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

commit 4a143260e3c00937a97d0f49e466953a742a77d5
Author: Austin Seipp <austin at well-typed.com>
Date:   Tue Oct 1 20:48:21 2013 -0500

    Delete old comments referring to newSession
    
    As Herbert pointed it, it was removed a long time ago.
    
    Authored-by: Kazu Yamamoto <kazu at iij.ad.jp>
    Signed-off-by: Austin Seipp <austin at well-typed.com>


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

4a143260e3c00937a97d0f49e466953a742a77d5
 compiler/main/DynFlags.hs    |    4 ++--
 compiler/main/StaticFlags.hs |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index d651d25..83d9bca 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -1250,7 +1250,7 @@ dynamicTooMkDynamicDynFlags dflags0
 
 -----------------------------------------------------------------------------
 
--- | Used by 'GHC.newSession' to partially initialize a new 'DynFlags' value
+-- | Used by 'GHC.runGhc' to partially initialize a new 'DynFlags' value
 initDynFlags :: DynFlags -> IO DynFlags
 initDynFlags dflags = do
  let -- We can't build with dynamic-too on Windows, as labels before
@@ -1287,7 +1287,7 @@ initDynFlags dflags = do
         }
 
 -- | The normal 'DynFlags'. Note that they is not suitable for use in this form
--- and must be fully initialized by 'GHC.newSession' first.
+-- and must be fully initialized by 'GHC.runGhc' first.
 defaultDynFlags :: Settings -> DynFlags
 defaultDynFlags mySettings =
      DynFlags {
diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs
index 1eb01ca..8b82f17 100644
--- a/compiler/main/StaticFlags.hs
+++ b/compiler/main/StaticFlags.hs
@@ -81,7 +81,7 @@ parseStaticFlagsFull :: [Flag IO] -> [Located String]
                      -> IO ([Located String], [Located String])
 parseStaticFlagsFull flagsAvailable args = do
   ready <- readIORef v_opt_C_ready
-  when ready $ throwGhcExceptionIO (ProgramError "Too late for parseStaticFlags: call it before newSession")
+  when ready $ throwGhcExceptionIO (ProgramError "Too late for parseStaticFlags: call it before runGhc or runGhcT")
 
   (leftover, errs, warns) <- processArgs flagsAvailable args
   when (not (null errs)) $ throwGhcExceptionIO $ errorsToGhcException errs
@@ -100,7 +100,7 @@ staticFlags :: [String]
 staticFlags = unsafePerformIO $ do
   ready <- readIORef v_opt_C_ready
   if (not ready)
-        then panic "Static flags have not been initialised!\n        Please call GHC.newSession or GHC.parseStaticFlags early enough."
+        then panic "Static flags have not been initialised!\n        Please call GHC.parseStaticFlags early enough."
         else readIORef v_opt_C
 
 -- All the static flags should appear in this list.  It describes how each




More information about the ghc-commits mailing list