aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/eval.lux
blob: 6431b59d6fe2ce0a30fece5183dd893fed4857e1 (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])
              (synthesis [";S" expression])
              (translation [";T" expression]
                           [";T" eval])))
  [../base])

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