diff options
author | simonpj@microsoft.com <unknown> | 2009-10-29 12:01:55 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2009-10-29 12:01:55 +0000 |
commit | f96194794bf099020706c3816d1a5678b40addbb (patch) | |
tree | 7290d705708527865d9d69056d40096e2389db45 /compiler/cmm/PprCmm.hs | |
parent | 016f155090557cd63f377b3ced95453bffd87d60 (diff) | |
download | haskell-f96194794bf099020706c3816d1a5678b40addbb.tar.gz |
Add Outputable.blankLine and use it
Diffstat (limited to 'compiler/cmm/PprCmm.hs')
-rw-r--r-- | compiler/cmm/PprCmm.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/cmm/PprCmm.hs b/compiler/cmm/PprCmm.hs index 9f622c0a64..d8d34c32c2 100644 --- a/compiler/cmm/PprCmm.hs +++ b/compiler/cmm/PprCmm.hs @@ -115,7 +115,7 @@ instance Outputable CmmInfo where ----------------------------------------------------------------------------- pprCmm :: (Outputable d, Outputable info, Outputable g) => GenCmm d info g -> SDoc -pprCmm (Cmm tops) = vcat $ intersperse (text "") $ map pprTop tops +pprCmm (Cmm tops) = vcat $ intersperse blankLine $ map pprTop tops -- -------------------------------------------------------------------------- -- Top level `procedure' blocks. @@ -506,9 +506,8 @@ pprLit :: CmmLit -> SDoc pprLit lit = case lit of CmmInt i rep -> hcat [ (if i < 0 then parens else id)(integer i) - , (if rep == wordWidth - then empty - else space <> dcolon <+> ppr rep) ] + , ppUnless (rep == wordWidth) $ + space <> dcolon <+> ppr rep ] CmmFloat f rep -> hsep [ rational f, dcolon, ppr rep ] CmmLabel clbl -> pprCLabel clbl |