X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FVarEnv.lhs;h=8274661be61b55e05aee3cee1e9d1fce704ebbfe;hb=903205d522185034734bec2be26d9ae574f311bf;hp=a9690f1faf60281b39b5b55572799925ee659a4b;hpb=1af5e42b269a97a1abdd670d43bf8c30c753bc84;p=ghc-hetmet.git diff --git a/compiler/basicTypes/VarEnv.lhs b/compiler/basicTypes/VarEnv.lhs index a9690f1..8274661 100644 --- a/compiler/basicTypes/VarEnv.lhs +++ b/compiler/basicTypes/VarEnv.lhs @@ -34,8 +34,6 @@ module VarEnv ( TidyEnv, emptyTidyEnv ) where -#include "HsVersions.h" - import OccName import Var import VarSet @@ -45,6 +43,8 @@ import Util import Maybes import Outputable import FastTypes +import StaticFlags +import FastString \end{code} @@ -61,7 +61,7 @@ data InScopeSet = InScope (VarEnv Var) FastInt -- INVARIANT: it's not zero; we use it as a multiplier in uniqAway instance Outputable InScopeSet where - ppr (InScope s _) = ptext SLIT("InScope") <+> ppr s + ppr (InScope s _) = ptext (sLit "InScope") <+> ppr s emptyInScopeSet :: InScopeSet emptyInScopeSet = InScope emptyVarSet (_ILIT(1)) @@ -130,16 +130,12 @@ uniqAway' (InScope set n) var where orig_unique = getUnique var try k -#ifdef DEBUG - | k ># _ILIT(1000) + | debugIsOn && (k ># _ILIT(1000)) = pprPanic "uniqAway loop:" (ppr (iBox k) <+> text "tries" <+> ppr var <+> int (iBox n)) -#endif | uniq `elemVarSetByKey` set = try (k +# _ILIT(1)) -#ifdef DEBUG - | opt_PprStyle_Debug && k ># _ILIT(3) + | debugIsOn && opt_PprStyle_Debug && (k ># _ILIT(3)) = pprTrace "uniqAway:" (ppr (iBox k) <+> text "tries" <+> ppr var <+> int (iBox n)) setVarUnique var uniq -#endif | otherwise = setVarUnique var uniq where uniq = deriveUnique orig_unique (iBox (n *# k))