[commit: ghc] wip/nested-cpr: Improve pprIfaceStrictSig (c6e4760)
git at git.haskell.org
git at git.haskell.org
Thu Dec 5 14:13:51 UTC 2013
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nested-cpr
Link : http://ghc.haskell.org/trac/ghc/changeset/c6e47601667945d51d686718c04e3b8e6cb383e3/ghc
>---------------------------------------------------------------
commit c6e47601667945d51d686718c04e3b8e6cb383e3
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Thu Dec 5 11:41:31 2013 +0000
Improve pprIfaceStrictSig
>---------------------------------------------------------------
c6e47601667945d51d686718c04e3b8e6cb383e3
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 b0c7f01..50ca43f 100644
--- a/compiler/basicTypes/Demand.lhs
+++ b/compiler/basicTypes/Demand.lhs
@@ -1507,7 +1507,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