diff options
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))) |