[Git][ghc/ghc][master] hadrian RunRest: add type signature for stageNumber
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Aug 10 10:03:19 UTC 2022
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
823fe5b5 by Jens Petersen at 2022-08-10T06:03:07-04:00
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
- - - - -
1 changed file:
- hadrian/src/Settings/Builders/RunTest.hs
Changes:
=====================================
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
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/823fe5b56450a7eefbf41ce8ece34095bf2217ee
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/823fe5b56450a7eefbf41ce8ece34095bf2217ee
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220810/d4450ed4/attachment-0001.html>
More information about the ghc-commits
mailing list