diff options
author | Eduardo Julian | 2017-11-15 19:51:33 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-11-15 19:51:33 -0400 |
commit | 296d087530cb142efec1dea159770346bb43c3c0 (patch) | |
tree | bde43594e5df48af539a0fda3e13cbf6aa36b557 /new-luxc/source/luxc/lang/eval.lux | |
parent | c4e928e5805054aa12da40baaeccbb9c522b52d0 (diff) |
- Heavy refactoring.
Diffstat (limited to 'new-luxc/source/luxc/lang/eval.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/eval.lux | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/lang/eval.lux b/new-luxc/source/luxc/lang/eval.lux new file mode 100644 index 000000000..20c3acaeb --- /dev/null +++ b/new-luxc/source/luxc/lang/eval.lux @@ -0,0 +1,18 @@ +(;module: + lux + (lux (control [monad #+ do]) + [meta]) + (luxc ["&" lang] + (lang (analysis [";A" expression]) + (synthesis [";S" expression]) + (translation [";T" expression] + [";T" eval])))) + +(def: #export (eval type exprC) + &;Eval + (do meta;Monad<Meta> + [exprA (&;with-expected-type type + (expressionA;analyser eval exprC)) + #let [exprS (expressionS;synthesize exprA)] + exprI (expressionT;translate exprS)] + (evalT;eval exprI))) |