From: sof Date: Thu, 4 Sep 1997 20:21:13 +0000 (+0000) Subject: [project @ 1997-09-04 20:21:13 by sof] X-Git-Tag: Approximately_1000_patches_recorded~4 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=72592f2014f3c7fefcf9e0802ba71f800f65c984 [project @ 1997-09-04 20:21:13 by sof] ppr wibble --- 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)