summaryrefslogtreecommitdiff
path: root/compiler/GHC/StgToCmm/Closure.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/StgToCmm/Closure.hs')
-rw-r--r--compiler/GHC/StgToCmm/Closure.hs14
1 files changed, 10 insertions, 4 deletions
diff --git a/compiler/GHC/StgToCmm/Closure.hs b/compiler/GHC/StgToCmm/Closure.hs
index cc299e58ca..9fec3472e0 100644
--- a/compiler/GHC/StgToCmm/Closure.hs
+++ b/compiler/GHC/StgToCmm/Closure.hs
@@ -1,4 +1,6 @@
-{-# LANGUAGE CPP, RecordWildCards #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE LambdaCase #-}
-----------------------------------------------------------------------------
--
@@ -114,9 +116,13 @@ data CgLoc
-- To tail-call it, assign to these locals,
-- and branch to the block id
-instance Outputable CgLoc where
- ppr (CmmLoc e) = text "cmm" <+> ppr e
- ppr (LneLoc b rs) = text "lne" <+> ppr b <+> ppr rs
+instance OutputableP CgLoc where
+ pdoc = pprCgLoc
+
+pprCgLoc :: Platform -> CgLoc -> SDoc
+pprCgLoc platform = \case
+ CmmLoc e -> text "cmm" <+> pdoc platform e
+ LneLoc b rs -> text "lne" <+> ppr b <+> ppr rs
type SelfLoopInfo = (Id, BlockId, [LocalReg])