diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-06-29 18:20:51 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-07-16 13:25:41 -0400 |
commit | f1c449910256c61cb35e361a367d5209bc51cc7a (patch) | |
tree | 1e2f0951f4e3b24d6c7075834526aca24711c7cd /compiler/GHC/Cmm/CLabel.hs | |
parent | 28347d7141761fc5c3c9bd66e5c4b2ea1c16f58a (diff) | |
download | haskell-f1c449910256c61cb35e361a367d5209bc51cc7a.tar.gz |
cmm: Eliminate orphan Outputable instances
Here we reorganize `GHC.Cmm` to eliminate the orphan `Outputable` and
`OutputableP` instances for the Cmm AST. This makes it significantly
easier to use the Cmm pretty-printers in tracing output without
incurring module import cycles.
Diffstat (limited to 'compiler/GHC/Cmm/CLabel.hs')
-rw-r--r-- | compiler/GHC/Cmm/CLabel.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/GHC/Cmm/CLabel.hs b/compiler/GHC/Cmm/CLabel.hs index 6d0870e281..adb5150f1a 100644 --- a/compiler/GHC/Cmm/CLabel.hs +++ b/compiler/GHC/Cmm/CLabel.hs @@ -827,6 +827,9 @@ data InfoProvEnt = InfoProvEnt -- Position and information about the info table deriving (Eq, Ord) +instance OutputableP Platform InfoProvEnt where + pdoc platform (InfoProvEnt clabel _ _ _ _) = pdoc platform clabel + -- Constructing Cost Center Labels mkCCLabel :: CostCentre -> CLabel mkCCSLabel :: CostCentreStack -> CLabel |