Fixed vect decl for sumP, enumfromToP
[ghc-hetmet.git] / compiler / basicTypes / VarEnv.lhs
index a9690f1..8274661 100644 (file)
@@ -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))