From 54815ade282ff4feb81d7d557188bde8111db376 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 5 Oct 2017 00:17:51 -0400 Subject: - Added tests for type-checking and type-coercion. - Implemented "eval". - Fixed bugs when analysing variants and tuples. --- new-luxc/source/luxc/eval.lux | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 new-luxc/source/luxc/eval.lux (limited to 'new-luxc/source/luxc/eval.lux') 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 + [exprA (../base;with-expected-type type + (analyser;analyser eval exprC)) + #let [exprS (synthesizer;synthesize exprA)]] + (eval;eval (expr;generate exprS)))) -- cgit v1.2.3