Commit graph

105 commits

Author SHA1 Message Date
Georges Dubus e73fc5d196 More WIP 2018-02-13 15:49:46 +01:00
Georges Dubus 7b651303e2 WIP fix recursive default args 2018-01-29 19:56:58 +01:00
Georges Dubus b61b5791bb Change the environment in evaluation to be a Map Text (NValue m)
Currently, the environment is passed as a `NValue m`, but is assumed to be
a set every single time it is used. This commit changes it `Map Text (NValue
m)`. Since this is used a lot, it defines a new type alias:

```
type ValueSet m = Map.Map Text (NValue m)
```

This has multiples benefits:
- Simplify some code by removing all the checks that the env is indeed a set
- Simplify the usage of the module by making clear that we need a set as the
  environment. (I especially like this, since it took me a while to figure out
  what that argument was supposed to be the first time).
- Make it simple to inject functions in the environment (for example to have
  builtins) since now the function definition doesn't need to unwrap the set.
2018-01-28 23:27:33 +01:00
Allen Nelson 50a3d0d0db make tests pass 2016-01-23 15:51:34 -06:00
Anders Papitto 00d7f06dd0 add some evaluation tests and fix bug 2015-12-20 22:17:34 -08:00