summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-07-05 11:31:32 -0400
committerBen Gamari <ben@well-typed.com>2019-07-18 20:55:11 -0400
commitd238d3062a9858fef667c6fbf80605b8209a937f (patch)
treecd3909a52e44d04f3013c07dd0a0cbb4c9c6d005
parentb9e9d8c97cc6f3f96466969a48a03f7be5999de2 (diff)
downloadhaskell-d238d3062a9858fef667c6fbf80605b8209a937f.tar.gz
Fix formatting of --info's "Debug on" field
As noted in #16914, the value `True` was used instead of `YES` here, in contrast to the other boolean fields emitted by `--info`. This confused the testsuite driver and broke the `ghc_debugged` testsuite predicate.
-rw-r--r--compiler/main/DynFlags.hs2
-rw-r--r--hadrian/src/Settings/Builders/RunTest.hs4
2 files changed, 2 insertions, 4 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 1f7de170a9..448e914ce6 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -5693,7 +5693,7 @@ compilerInfo dflags
("GHC Dynamic", showBool dynamicGhc),
-- Whether or not GHC was compiled using -prof
("GHC Profiled", showBool rtsIsProfiled),
- ("Debug on", show debugIsOn),
+ ("Debug on", showBool debugIsOn),
("LibDir", topDir dflags),
-- The path of the global package database used by GHC
("Global Package DB", systemPackageConfig dflags)
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs
index ff35d95737..4b4d815a2c 100644
--- a/hadrian/src/Settings/Builders/RunTest.hs
+++ b/hadrian/src/Settings/Builders/RunTest.hs
@@ -68,7 +68,7 @@ runTestBuilderArgs = builder RunTest ? do
withInterpreter <- getBooleanSetting TestGhcWithInterpreter
unregisterised <- getBooleanSetting TestGhcUnregisterised
withSMP <- getBooleanSetting TestGhcWithSMP
- debugged <- readBool <$> getTestSetting TestGhcDebugged
+ debugged <- getBooleanSetting TestGhcDebugged
keepFiles <- expr (testKeepFiles <$> userSetting defaultTestArgs)
accept <- expr (testAccept <$> userSetting defaultTestArgs)
@@ -140,8 +140,6 @@ runTestBuilderArgs = builder RunTest ? do
, getTestArgs -- User-provided arguments from command line.
]
- where readBool x = read x :: Bool
-
-- | Command line arguments for running GHC's test script.
getTestArgs :: Args
getTestArgs = do