diff options
author | Eduardo Julian | 2017-10-05 00:17:51 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-05 00:17:51 -0400 |
commit | 54815ade282ff4feb81d7d557188bde8111db376 (patch) | |
tree | 1cdb03715bca9d88557781113cadd7296d0327af /new-luxc/source/luxc/eval.lux | |
parent | ece2c0ba374fdc05976e3f164517a11fb75b427f (diff) |
- Added tests for type-checking and type-coercion.
- Implemented "eval".
- Fixed bugs when analysing variants and tuples.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/eval.lux | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/eval.lux b/new-luxc/source/luxc/eval.lux new file mode 100644 index 000000000..266becee6 --- /dev/null +++ b/new-luxc/source/luxc/eval.lux @@ -0,0 +1,17 @@ +(;module: + lux + (lux (control [monad #+ do]) + [macro]) + [../base] + (.. [analyser] + [synthesizer] + (generator [expr] + [eval]))) + +(def: #export (eval type exprC) + ../base;Eval + (do macro;Monad<Lux> + [exprA (../base;with-expected-type type + (analyser;analyser eval exprC)) + #let [exprS (synthesizer;synthesize exprA)]] + (eval;eval (expr;generate exprS)))) |