From 59264221c24a17e7c8ecde3e289882b9620bd5a8 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Fri, 24 Nov 2006 11:07:50 +0000 Subject: [PATCH] Use existing function uniqAway instead of duplicating code --- compiler/basicTypes/VarEnv.lhs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/basicTypes/VarEnv.lhs b/compiler/basicTypes/VarEnv.lhs index 3c9f53a..0b2553a 100644 --- a/compiler/basicTypes/VarEnv.lhs +++ b/compiler/basicTypes/VarEnv.lhs @@ -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 -- 1.7.10.4