[commit: ghc] master: Less verbose output for the in-scope set (632f020)
git at git.haskell.org
git at git.haskell.org
Tue Jan 26 10:48:42 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/632f020b6ee6fa1ebf9942a11be9d3a6a0cd4c06/ghc
>---------------------------------------------------------------
commit 632f020b6ee6fa1ebf9942a11be9d3a6a0cd4c06
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Jan 25 14:17:14 2016 +0000
Less verbose output for the in-scope set
With -dppr-debug the output for the (ofen-large) InScope set
was overwhelming. This makes it smaller.
Only affects debugging.
>---------------------------------------------------------------
632f020b6ee6fa1ebf9942a11be9d3a6a0cd4c06
compiler/basicTypes/VarEnv.hs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/compiler/basicTypes/VarEnv.hs b/compiler/basicTypes/VarEnv.hs
index 08eabee..10a7f14 100644
--- a/compiler/basicTypes/VarEnv.hs
+++ b/compiler/basicTypes/VarEnv.hs
@@ -99,7 +99,10 @@ data InScopeSet = InScope (VarEnv Var) {-# UNPACK #-} !Int
-- INVARIANT: it's not zero; we use it as a multiplier in uniqAway
instance Outputable InScopeSet where
- ppr (InScope s _) = text "InScope" <+> ppr s
+ ppr (InScope s _) = text "InScope"
+ <+> braces (fsep (map (ppr . Var.varName) (varSetElems s)))
+ -- In-scope sets get big, and with -dppr-debug
+ -- the output is overwhelming
emptyInScopeSet :: InScopeSet
emptyInScopeSet = InScope emptyVarSet 1
More information about the ghc-commits
mailing list