summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r--compiler/main/DynFlags.hs17
1 files changed, 14 insertions, 3 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index d745cd63af..07ebd4013e 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -670,6 +670,8 @@ data DynFlags = DynFlags {
maxWorkerArgs :: Int,
+ ghciHistSize :: Int,
+
-- | MsgDoc output action: use "ErrUtils" instead of this if you can
log_action :: LogAction,
flushOut :: FlushOut,
@@ -688,7 +690,9 @@ data DynFlags = DynFlags {
interactivePrint :: Maybe String,
- llvmVersion :: IORef (Int)
+ llvmVersion :: IORef (Int),
+
+ nextWrapperNum :: IORef Int
}
class HasDynFlags m where
@@ -1109,12 +1113,14 @@ initDynFlags dflags = do
refFilesToNotIntermediateClean <- newIORef []
refGeneratedDumps <- newIORef Set.empty
refLlvmVersion <- newIORef 28
+ wrapperNum <- newIORef 0
return dflags{
filesToClean = refFilesToClean,
dirsToClean = refDirsToClean,
filesToNotIntermediateClean = refFilesToNotIntermediateClean,
generatedDumps = refGeneratedDumps,
- llvmVersion = refLlvmVersion
+ llvmVersion = refLlvmVersion,
+ nextWrapperNum = wrapperNum
}
-- | The normal 'DynFlags'. Note that they is not suitable for use in this form
@@ -1227,6 +1233,8 @@ defaultDynFlags mySettings =
maxWorkerArgs = 10,
+ ghciHistSize = 50, -- keep a log of length 50 by default
+
log_action = defaultLogAction,
flushOut = defaultFlushOut,
flushErr = defaultFlushErr,
@@ -1235,7 +1243,8 @@ defaultDynFlags mySettings =
traceLevel = 1,
profAuto = NoProfAuto,
llvmVersion = panic "defaultDynFlags: No llvmVersion",
- interactivePrint = Nothing
+ interactivePrint = Nothing,
+ nextWrapperNum = panic "defaultDynFlags: No nextWrapperNum"
}
defaultWays :: Settings -> [Way]
@@ -2126,6 +2135,8 @@ dynamic_flags = [
, Flag "fmax-worker-args" (intSuffix (\n d -> d {maxWorkerArgs = n}))
+ , Flag "fghci-hist-size" (intSuffix (\n d -> d {ghciHistSize = n}))
+
------ Profiling ----------------------------------------------------
-- OLD profiling flags