[commit: ghc] wip/annotate-core: Add binds type for Rec (836dddb)

git at git.haskell.org git at git.haskell.org
Wed Aug 9 15:27:26 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/annotate-core
Link       : http://ghc.haskell.org/trac/ghc/changeset/836dddb535084956b1d2e0f45a8f59dd55feee3d/ghc

>---------------------------------------------------------------

commit 836dddb535084956b1d2e0f45a8f59dd55feee3d
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Wed Aug 9 15:27:02 2017 +0000

    Add binds type for Rec


>---------------------------------------------------------------

836dddb535084956b1d2e0f45a8f59dd55feee3d
 compiler/coreSyn/PprCore.hs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/compiler/coreSyn/PprCore.hs b/compiler/coreSyn/PprCore.hs
index 2b001d9..02a0ffb 100644
--- a/compiler/coreSyn/PprCore.hs
+++ b/compiler/coreSyn/PprCore.hs
@@ -104,12 +104,13 @@ pprTopBind ann b@(NonRec binder expr)
 
 pprTopBind _ (Rec [])
   = text "Rec { }"
-pprTopBind ann (Rec (b:bs))
-  = vcat [text "Rec {",
+pprTopBind ann bi@(Rec (b:bs))
+  = addAnn (PBind bi)
+      (vcat [text "Rec {",
           ppr_binding ann b,
           vcat [blankLine $$ ppr_binding ann b | b <- bs],
           text "end Rec }",
-          blankLine]
+          blankLine])
 
 ppr_bind :: (OutputableBndr b, NamedThing b) => Annotation b -> Bind b -> SDoc
 



More information about the ghc-commits mailing list