Fix recset evaluation logic

Before, an evaluation of a recset would contain all the environment. Eg:
```
>>> let a = 4; in rec {x = 2;}
{x = 2; a = 4;}
```

This commit changes it to only contain the values actually bound in the set:
```
>>> let a = 4; in rec {x = 2;}
{x = 2;}
```
This commit is contained in:
Georges Dubus 2018-01-26 13:19:14 +01:00
parent 8b47c8b143
commit 3ffba374ae
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ evalExpr = cata phi
rec
mergedEnv <- pure $ Fix $ NVSet $ evaledBinds `Map.union` env'
evaledBinds <- evalBinds True mergedEnv binds
pure mergedEnv
pure . Fix . NVSet $ evaledBinds
_ -> error "invalid evaluation environment"
phi (NLet binds e) = \env -> case env of