Function fungi_lang::eval::eval [] [src]

pub fn eval(env: Env, e: Exp) -> ExpTerm

Big-step evaluation

Under the given closing environment, evaluate the given Tgt-AST expression, producing a terminal expression (a la CBPV), typically with run-time values.

Adapton primitives: The primitives thunk, ref, force and get each use the Adapton run-time library in a simple way that directly corresponds with the given expression form.

CPBV consequences: Due to CBPV style, most cases are simple (0 or 1 recursive calls). The only two cases that have multiple recursive calls are let and app, which necessarily each have two recursive calls to eval. In CBV style, many more cases would require multiple recursive calls to eval.