[commit: ghc] master: Show recursive Stg bindings in Rec {} blocks (f899b38)
git at git.haskell.org
git at git.haskell.org
Thu Dec 13 04:56:12 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/f899b3892a8c1ce130d6f3f952045fc758099501/ghc
>---------------------------------------------------------------
commit f899b3892a8c1ce130d6f3f952045fc758099501
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date: Thu Dec 13 07:55:38 2018 +0300
Show recursive Stg bindings in Rec {} blocks
Makes the printer same as Rec binding printer in Core
Reviewers: sgraf, bgamari
Reviewed By: sgraf
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5441
>---------------------------------------------------------------
f899b3892a8c1ce130d6f3f952045fc758099501
compiler/stgSyn/StgSyn.hs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/compiler/stgSyn/StgSyn.hs b/compiler/stgSyn/StgSyn.hs
index e55cba6..2f3148c 100644
--- a/compiler/stgSyn/StgSyn.hs
+++ b/compiler/stgSyn/StgSyn.hs
@@ -725,8 +725,9 @@ pprGenStgBinding (StgNonRec bndr rhs)
4 (ppr rhs <> semi)
pprGenStgBinding (StgRec pairs)
- = vcat $ whenPprDebug (text "{- StgRec (begin) -}") :
- map (ppr_bind) pairs ++ [whenPprDebug (text "{- StgRec (end) -}")]
+ = vcat [ text "Rec {"
+ , vcat (map ppr_bind pairs)
+ , text "end Rec }" ]
where
ppr_bind (bndr, expr)
= hang (hsep [pprBndr LetBind bndr, equals])
More information about the ghc-commits
mailing list