Skip to content
Snippets Groups Projects
Commit 27978ceb authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Marge Bot
Browse files

Make Cmm Lint messages use dump style

Lint errors indicate an internal error in GHC, so it makes sense to use
it instead of the user style. This is consistent with Core Lint and STG Lint:

https://gitlab.haskell.org/ghc/ghc/-/blob/22096652/compiler/GHC/Core/Lint.hs#L429

https://gitlab.haskell.org/ghc/ghc/-/blob/22096652/compiler/GHC/Stg/Lint.hs#L144

Fixes #22218.
parent 9b572d54
No related branches found
No related tags found
No related merge requests found
Pipeline #57712 passed with warnings
......@@ -50,7 +50,8 @@ cmmLintGraph platform g = runCmmLint platform lintCmmGraph g
runCmmLint :: OutputableP Platform a => Platform -> (a -> CmmLint b) -> a -> Maybe SDoc
runCmmLint platform l p =
case unCL (l p) platform of
Left err -> Just (vcat [text "Cmm lint error:",
Left err -> Just (withPprStyle defaultDumpStyle $ vcat
[text "Cmm lint error:",
nest 2 err,
text "Program was:",
nest 2 (pdoc platform p)])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment