From 83283b0d6a1e714def620a2ad2a7166c6c3a0147 Mon Sep 17 00:00:00 2001 From: hallgren Date: Mon, 9 Sep 2013 14:29:57 +0000 Subject: Fix an old name shadowing bug in concrete syntax by removing the refresh pass The refresh pass does not correctly keep track of the scope of local variables and can convert things like \x->(\x->x) x into \x1->(\x2->x2) x2. Fortunately, it appears that the refresh pass is not needed anymore, so it has been removed. --- src/compiler/GF/Grammar/MMacros.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/compiler/GF/Grammar') diff --git a/src/compiler/GF/Grammar/MMacros.hs b/src/compiler/GF/Grammar/MMacros.hs index 233eb768f..c52ee4ce2 100644 --- a/src/compiler/GF/Grammar/MMacros.hs +++ b/src/compiler/GF/Grammar/MMacros.hs @@ -20,7 +20,7 @@ import GF.Data.Operations import GF.Grammar.Grammar import GF.Grammar.Printer import GF.Infra.Ident -import GF.Compile.Refresh +--import GF.Compile.Refresh import GF.Grammar.Values ----import GrammarST import GF.Grammar.Macros @@ -160,12 +160,12 @@ substitute v s = return . substTerm v s alphaConv :: [Var] -> (Var,Var) -> Exp -> Err Exp --- alphaConv oldvars (x,x') = substitute (x:x':oldvars) [(x,Vr x')] -alphaFresh :: [Var] -> Exp -> Err Exp -alphaFresh vs = refreshTermN $ maxVarIndex vs +--alphaFresh :: [Var] -> Exp -> Err Exp +--alphaFresh vs = refreshTermN $ maxVarIndex vs -- | done in a state monad -alphaFreshAll :: [Var] -> [Exp] -> Err [Exp] -alphaFreshAll vs = mapM $ alphaFresh vs +--alphaFreshAll :: [Var] -> [Exp] -> Err [Exp] +--alphaFreshAll vs = mapM $ alphaFresh vs -- | for display val2exp :: Val -> Err Exp -- cgit v1.2.3