[commit: ghc] wip/nested-cpr: Improve pprIfaceStrictSig (781e4ca)

git at git.haskell.org git at git.haskell.org
Thu Dec 5 19:00:11 UTC 2013


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

On branch  : wip/nested-cpr
Link       : http://ghc.haskell.org/trac/ghc/changeset/781e4cad108ca2e242dbc5686a3a0aeafe3d6c24/ghc

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

commit 781e4cad108ca2e242dbc5686a3a0aeafe3d6c24
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Thu Dec 5 11:41:31 2013 +0000

    Improve pprIfaceStrictSig


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

781e4cad108ca2e242dbc5686a3a0aeafe3d6c24
 compiler/basicTypes/Demand.lhs |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/basicTypes/Demand.lhs b/compiler/basicTypes/Demand.lhs
index 5d011e8..29ddc7a 100644
--- a/compiler/basicTypes/Demand.lhs
+++ b/compiler/basicTypes/Demand.lhs
@@ -1474,7 +1474,9 @@ seqStrictSig (StrictSig ty) = seqDmdType ty
 -- Used for printing top-level strictness pragmas in interface files
 pprIfaceStrictSig :: StrictSig -> SDoc
 pprIfaceStrictSig (StrictSig (DmdType _ dmds res))
-  = hcat (map ppr dmds) <> ppr res
+  = hcat (map ppr dmds) <> ppr_res
+  where
+  ppr_res = if isTopRes res then empty else ppr res
 \end{code}
 
 Zap absence or one-shot information, under control of flags



More information about the ghc-commits mailing list