summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-03-29 13:59:50 +0000
committerIan Lynagh <igloo@earth.li>2008-03-29 13:59:50 +0000
commit7163be78dfc760f2b288c78260cb2929b6253aa1 (patch)
tree32370e3e68cad20fc9a022a80ace4e7673f1cb12 /compiler
parent71847273007b8346735f6ec34bfcc8750e2c6ecd (diff)
downloadhaskell-7163be78dfc760f2b288c78260cb2929b6253aa1.tar.gz
Convert some DEBUG uses to debugIsOn
Diffstat (limited to 'compiler')
-rw-r--r--compiler/basicTypes/VarEnv.lhs9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/basicTypes/VarEnv.lhs b/compiler/basicTypes/VarEnv.lhs
index a9690f1faf..67bc120430 100644
--- a/compiler/basicTypes/VarEnv.lhs
+++ b/compiler/basicTypes/VarEnv.lhs
@@ -45,6 +45,7 @@ import Util
import Maybes
import Outputable
import FastTypes
+import StaticFlags
\end{code}
@@ -130,16 +131,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))