diff options
author | Jens Petersen <petersen@redhat.com> | 2022-08-09 15:34:43 +0800 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-08-10 06:03:07 -0400 |
commit | 823fe5b56450a7eefbf41ce8ece34095bf2217ee (patch) | |
tree | 5d3e23ca63260565f86e1c564c4b36ab9224bf52 | |
parent | dc76439de605bb833d6e226b176879cb0d5262ce (diff) | |
download | haskell-823fe5b56450a7eefbf41ce8ece34095bf2217ee.tar.gz |
hadrian RunRest: add type signature for stageNumber
avoids warning seen on 9.4.1:
src/Settings/Builders/RunTest.hs:264:53: warning: [-Wtype-defaults]
• Defaulting the following constraints to type ‘Integer’
(Show a0)
arising from a use of ‘show’
at src/Settings/Builders/RunTest.hs:264:53-84
(Num a0)
arising from a use of ‘stageNumber’
at src/Settings/Builders/RunTest.hs:264:59-83
• In the second argument of ‘(++)’, namely
‘show (stageNumber (C.stage ctx))’
In the second argument of ‘($)’, namely
‘"config.stage=" ++ show (stageNumber (C.stage ctx))’
In the expression:
arg $ "config.stage=" ++ show (stageNumber (C.stage ctx))
|
264 | , arg "-e", arg $ "config.stage=" ++ show (stageNumber (C.stage ctx))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
compilation tested locally
-rw-r--r-- | hadrian/src/Settings/Builders/RunTest.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs index 9118efe511..3af35828ac 100644 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ b/hadrian/src/Settings/Builders/RunTest.hs @@ -285,6 +285,7 @@ runTestBuilderArgs = builder Testsuite ? do where emitWhenSet Nothing _ = mempty emitWhenSet (Just v) f = f v + stageNumber :: Stage -> Int stageNumber (Stage0 GlobalLibs) = error "stageNumber stageBoot" stageNumber (Stage0 InTreeLibs) = 1 stageNumber Stage1 = 2 |