Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
7163be78
Commit
7163be78
authored
Mar 29, 2008
by
Ian Lynagh
Browse files
Convert some DEBUG uses to debugIsOn
parent
71847273
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/basicTypes/VarEnv.lhs
View file @
7163be78
...
...
@@ -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))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment