projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove GADT refinements, part 4
[ghc-hetmet.git]
/
compiler
/
basicTypes
/
VarEnv.lhs
diff --git
a/compiler/basicTypes/VarEnv.lhs
b/compiler/basicTypes/VarEnv.lhs
index
a9690f1
..
bb988b2
100644
(file)
--- a/
compiler/basicTypes/VarEnv.lhs
+++ b/
compiler/basicTypes/VarEnv.lhs
@@
-45,6
+45,8
@@
import Util
import Maybes
import Outputable
import FastTypes
import Maybes
import Outputable
import FastTypes
+import StaticFlags
+import FastString
\end{code}
\end{code}
@@
-130,16
+132,12
@@
uniqAway' (InScope set n) var
where
orig_unique = getUnique var
try k
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))
= pprPanic "uniqAway loop:" (ppr (iBox k) <+> text "tries" <+> ppr var <+> int (iBox n))
-#endif
| uniq `elemVarSetByKey` set = try (k +# _ILIT(1))
| 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
= 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))
| otherwise = setVarUnique var uniq
where
uniq = deriveUnique orig_unique (iBox (n *# k))