Fix another α-normalization bug (#938)

This was caught by the following test:

372230d161/tests/alpha-normalization/success/unit/FunctionNestedBindingXXFreeA.dhall
This commit is contained in:
Gabriel Gonzalez 2019-05-05 19:30:26 -07:00 committed by GitHub
parent 2fc7f79959
commit 7d56778350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -843,7 +843,7 @@ alphaNormalize = goEnv NEmpty where
go !acc (NBind env x) !i
| x == topX = if i == 0 then Var (V "_" acc) else go (acc + 1) env (i - 1)
| otherwise = go (acc + 1) env i
go acc NEmpty i = Var (V topX topI)
go acc NEmpty i = Var (V topX i)
goEnv :: Names -> Expr s a -> Expr s a
goEnv !e t = let