X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FVarEnv.lhs;h=bb988b259159394899c5ed8d3948bde424ee4e9c;hb=bf1bf9fb07f1607aa66e7490b2df1ac1b62dd2d0;hp=a9690f1faf60281b39b5b55572799925ee659a4b;hpb=1af5e42b269a97a1abdd670d43bf8c30c753bc84;p=ghc-hetmet.git diff --git a/compiler/basicTypes/VarEnv.lhs b/compiler/basicTypes/VarEnv.lhs index a9690f1..bb988b2 100644 --- a/compiler/basicTypes/VarEnv.lhs +++ b/compiler/basicTypes/VarEnv.lhs @@ -45,6 +45,8 @@ import Util import Maybes import Outputable import FastTypes +import StaticFlags +import FastString \end{code} @@ -130,16 +132,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))