X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FVarEnv.lhs;h=0b2553a3d4dac90818d05d788c909c74a19f0f9b;hb=84923cc7de2a93c22a2f72daf9ac863959efae13;hp=e59c800c1ea710aeb780ae2a2b3f85c0b88e8528;hpb=d5bba9ee196f64a077e922680b16fe6f28fb79db;p=ghc-hetmet.git diff --git a/compiler/basicTypes/VarEnv.lhs b/compiler/basicTypes/VarEnv.lhs index e59c800..0b2553a 100644 --- a/compiler/basicTypes/VarEnv.lhs +++ b/compiler/basicTypes/VarEnv.lhs @@ -1,7 +1,7 @@ - +% +% (c) The University of Glasgow 2006 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -\section{@VarEnvs@: Variable environments} \begin{code} module VarEnv ( @@ -36,14 +36,14 @@ module VarEnv ( #include "HsVersions.h" -import OccName ( TidyOccEnv, emptyTidyOccEnv ) -import Var ( Var, setVarUnique ) +import OccName +import Var import VarSet import UniqFM -import Unique ( Unique, deriveUnique, getUnique ) -import Util ( zipEqual, foldl2 ) -import Maybes ( orElse ) -import StaticFlags( opt_PprStyle_Debug ) +import Unique +import Util +import Maybes +import StaticFlags import Outputable import FastTypes \end{code} @@ -231,16 +231,14 @@ rnBndrL (RV2 { envL = envL, envR = envR, in_scope = in_scope }) bL , envR = envR , in_scope = extendInScopeSet in_scope new_b }, new_b) where - new_b | not (bL `elemInScopeSet` in_scope) = bL - | otherwise = uniqAway' in_scope bL + new_b = uniqAway in_scope bL rnBndrR (RV2 { envL = envL, envR = envR, in_scope = in_scope }) bR = (RV2 { envL = envL , envR = extendVarEnv envR bR new_b , in_scope = extendInScopeSet in_scope new_b }, new_b) where - new_b | not (bR `elemInScopeSet` in_scope) = bR - | otherwise = uniqAway' in_scope bR + new_b = uniqAway in_scope bR rnOccL, rnOccR :: RnEnv2 -> Var -> Var -- Look up the renaming of an occurrence in the left or right term