Commit 4a143260 authored by Austin Seipp's avatar Austin Seipp
Browse files

Delete old comments referring to newSession



As Herbert pointed it, it was removed a long time ago.
Authored-by: kazu-yamamoto's avatarKazu Yamamoto <kazu@iij.ad.jp>
Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent d6ccea98
......@@ -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.runGhc' first.
defaultDynFlags :: Settings -> DynFlags
defaultDynFlags mySettings =
DynFlags {
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment