[Git][ghc/ghc][master] Make Cmm Lint messages use dump style

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Oct 12 03:46:03 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
27978ceb by Krzysztof Gogolewski at 2022-10-11T23:45:46-04:00
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.

- - - - -


1 changed file:

- compiler/GHC/Cmm/Lint.hs


Changes:

=====================================
compiler/GHC/Cmm/Lint.hs
=====================================
@@ -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)])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/27978ceb649e929df29a94e98916c341169395af

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/27978ceb649e929df29a94e98916c341169395af
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/20221011/ee619dec/attachment.html>


More information about the ghc-commits mailing list