diff options
| author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-09-05 19:08:13 +0200 |
|---|---|---|
| committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-09-07 16:43:58 -0400 |
| commit | ee1cfaa990205dc96148ed20c2d6560b4808b0b7 (patch) | |
| tree | bc724be5ec8f4d451e690afdd9f7602eb7c34256 /compiler/GHC/Cmm | |
| parent | 04a738cb23e82b32caf38b7965f5042e6af6ee88 (diff) | |
| download | haskell-ee1cfaa990205dc96148ed20c2d6560b4808b0b7.tar.gz | |
Minor SDoc cleanup
Change calls to renderWithContext with showSDocOneLine; it's more
efficient and explanatory.
Remove polyPatSig (unused)
Diffstat (limited to 'compiler/GHC/Cmm')
| -rw-r--r-- | compiler/GHC/Cmm/Dominators.hs | 6 | ||||
| -rw-r--r-- | compiler/GHC/Cmm/Parser.y | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/compiler/GHC/Cmm/Dominators.hs b/compiler/GHC/Cmm/Dominators.hs index 7e55440c3f..8321211e89 100644 --- a/compiler/GHC/Cmm/Dominators.hs +++ b/compiler/GHC/Cmm/Dominators.hs @@ -38,9 +38,7 @@ import GHC.Cmm.Dataflow.Graph import GHC.Cmm.Dataflow.Label import GHC.Cmm -import GHC.Utils.Outputable( Outputable(..), text, int, hcat, (<+>) - , showSDocUnsafe - ) +import GHC.Utils.Outputable( Outputable(..), text, int, hcat, (<+>)) import GHC.Utils.Misc import GHC.Utils.Panic @@ -188,7 +186,7 @@ gwdRPNumber g l = findLabelIn l (gwd_rpnumbering g) findLabelIn :: HasDebugCallStack => Label -> LabelMap a -> a findLabelIn lbl = mapFindWithDefault failed lbl where failed = - panic $ "label " ++ showSDocUnsafe (ppr lbl) ++ " not found in result of analysis" + pprPanic "label not found in result of analysis" (ppr lbl) -- | Use `gwdDominatorsOf` on the result of the dominator analysis to get -- a mapping from the `Label` of each reachable block to the dominator diff --git a/compiler/GHC/Cmm/Parser.y b/compiler/GHC/Cmm/Parser.y index 312dc2e4f7..67ce361a02 100644 --- a/compiler/GHC/Cmm/Parser.y +++ b/compiler/GHC/Cmm/Parser.y @@ -449,7 +449,7 @@ cmmproc :: { CmmParse () } platform <- getPlatform; ctx <- getContext; formals <- sequence (fromMaybe [] $3); - withName (renderWithContext ctx (pprCLabel platform CStyle entry_ret_label)) + withName (showSDocOneLine ctx (pprCLabel platform CStyle entry_ret_label)) $4; return (entry_ret_label, info, stk_formals, formals) } let do_layout = isJust $3 |
