diff options
author | simonpj@microsoft.com <unknown> | 2006-11-06 16:02:44 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2006-11-06 16:02:44 +0000 |
commit | 6f074a37a1546391632863898da3c32bbb7995df (patch) | |
tree | 5c3536942cd293990803065481d71ebf431c470a /compiler/simplCore/SimplEnv.lhs | |
parent | 94b170a053c161d1e0cc4418b37a6a4807872a5f (diff) | |
download | haskell-6f074a37a1546391632863898da3c32bbb7995df.tar.gz |
Various debugging print changes; nothing exciting
Diffstat (limited to 'compiler/simplCore/SimplEnv.lhs')
-rw-r--r-- | compiler/simplCore/SimplEnv.lhs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/compiler/simplCore/SimplEnv.lhs b/compiler/simplCore/SimplEnv.lhs index 765fd004d7..c9fb4fbb8b 100644 --- a/compiler/simplCore/SimplEnv.lhs +++ b/compiler/simplCore/SimplEnv.lhs @@ -21,7 +21,7 @@ module SimplEnv ( setEnclosingCC, getEnclosingCC, -- Environments - SimplEnv(..), -- Temp not abstract + SimplEnv(..), pprSimplEnv, -- Temp not abstract mkSimplEnv, extendIdSubst, SimplEnv.extendTvSubst, zapSubstEnv, setSubstEnv, getInScope, setInScope, setInScopeSet, modifyInScope, addNewInScopeIds, @@ -129,6 +129,12 @@ data SimplEnv } +pprSimplEnv :: SimplEnv -> SDoc +-- Used for debugging; selective +pprSimplEnv env + = vcat [ptext SLIT("TvSubst:") <+> ppr (seTvSubst env), + ptext SLIT("IdSubst:") <+> ppr (seIdSubst env) ] + type SimplIdSubst = IdEnv SimplSR -- IdId |--> OutExpr -- See Note [Extending the Subst] in CoreSubst @@ -144,10 +150,10 @@ instance Outputable SimplSR where ppr (DoneId v) = ptext SLIT("DoneId") <+> ppr v ppr (ContEx tv id e) = vcat [ptext SLIT("ContEx") <+> ppr e {-, ppr (filter_env tv), ppr (filter_env id) -}] - where - fvs = exprFreeVars e - filter_env env = filterVarEnv_Directly keep env - keep uniq _ = uniq `elemUFM_Directly` fvs + -- where + -- fvs = exprFreeVars e + -- filter_env env = filterVarEnv_Directly keep env + -- keep uniq _ = uniq `elemUFM_Directly` fvs \end{code} |