From 72592f2014f3c7fefcf9e0802ba71f800f65c984 Mon Sep 17 00:00:00 2001 From: sof Date: Thu, 4 Sep 1997 20:21:13 +0000 Subject: [PATCH] [project @ 1997-09-04 20:21:13 by sof] ppr wibble --- ghc/compiler/coreSyn/PprCore.lhs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/coreSyn/PprCore.lhs b/ghc/compiler/coreSyn/PprCore.lhs index 29f26b0..f82c58d 100644 --- a/ghc/compiler/coreSyn/PprCore.lhs +++ b/ghc/compiler/coreSyn/PprCore.lhs @@ -12,7 +12,7 @@ module PprCore ( pprCoreExpr, pprIfaceUnfolding, - pprCoreBinding, + pprCoreBinding, pprCoreBindings, pprBigCoreBinder, pprTypedCoreBinder @@ -65,7 +65,8 @@ print something. @pprParendCoreExpr@ puts parens around non-atomic Core expressions. \begin{code} -pprCoreBinding :: PprStyle -> CoreBinding -> Doc +pprCoreBinding :: PprStyle -> CoreBinding -> Doc +pprCoreBindings :: PprStyle -> [CoreBinding] -> Doc pprGenCoreBinding :: (Eq tyvar, Outputable tyvar, @@ -117,6 +118,8 @@ init_ppr_env sty tvbndr pbdr1 pbdr2 pocc | otherwise = ppr sty prim <> char '!' -------------- +pprCoreBindings sty binds = vcat (map (pprCoreBinding sty) binds) + pprCoreBinding sty (NonRec binder expr) = hang (hsep [pprBigCoreBinder sty binder, equals]) 4 (pprCoreExpr sty (pprBigCoreBinder sty) (pprBabyCoreBinder sty) (ppr sty) expr) -- 1.7.10.4