aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/eval.lux
blob: fdbf8e781935ad31ca909f3b93bccaaaf6924b6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(;module:
  lux
  (lux (control [monad #+ do])
       [meta])
  (luxc (lang (analysis [";A" expression])))
  [../base]
  (.. [synthesizer]
      (generator [";G" expression]
                 [eval])))

(def: #export (eval type exprC)
  ../base;Eval
  (do meta;Monad<Meta>
    [exprA (../base;with-expected-type type
             (expressionA;analyser eval exprC))
     #let [exprS (synthesizer;synthesize exprA)]
     exprI (expressionG;generate exprS)]
    (eval;eval exprI)))