summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2013-09-09 14:29:57 +0000
committerhallgren <hallgren@chalmers.se>2013-09-09 14:29:57 +0000
commit83283b0d6a1e714def620a2ad2a7166c6c3a0147 (patch)
treea2b4ce8733808e516ad9ba573395599da5a0685e /src/compiler/GF/Grammar
parent5a4454aa8f910bc701da5cd4057eed77196764ad (diff)
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.
Diffstat (limited to 'src/compiler/GF/Grammar')
-rw-r--r--src/compiler/GF/Grammar/MMacros.hs10
1 files changed, 5 insertions, 5 deletions
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