|
x-engine-c v0.2.13
The C engine for x-lang
|
Core primitives: pair, first, rest, apply, eval, wrap/unwrap, atomic, base. More...
#include "x-prim.h"#include "x-eval.h"#include "x-env.h"#include "x-tco.h"#include "x-toplevel.h"#include "x-type/int.h"#include "x-type/list.h"#include "x-type/prim.h"#include "x-type/procedure.h"Functions | |
| static x_obj_t * | x_prim_pair (x_obj_t *p_base, x_obj_t *p_args) |
| static x_obj_t * | x_prim_first (x_obj_t *p_base, x_obj_t *p_args) |
| static x_obj_t * | x_prim_rest (x_obj_t *p_base, x_obj_t *p_args) |
| static x_obj_t * | x_prim_apply (x_obj_t *p_base, x_obj_t *p_args) |
| static x_obj_t * | x_prim_eval (x_obj_t *p_base, x_obj_t *p_args) |
| static x_obj_t * | x_prim_eval_immediate (x_obj_t *p_base, x_obj_t *p_args) |
| static x_obj_t * | x_prim_tail_eval (x_obj_t *p_base, x_obj_t *p_args) |
| static x_obj_t * | x_prim_wrap (x_obj_t *p_base, x_obj_t *p_args) |
| static x_obj_t * | x_prim_unwrap (x_obj_t *p_base, x_obj_t *p_args) |
| static x_obj_t * | x_prim_atomic (x_obj_t *p_base, x_obj_t *p_args) |
| static x_obj_t * | x_prim_base (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_prim_core_register (x_obj_t *p_base, x_obj_t *p_args) |
Core primitives: pair, first, rest, apply, eval, wrap/unwrap, atomic, base.
Apply a callable to arguments with a trailing argument list. x-lang: (apply f arg1 ... args)
| p_base | Base (execution context). |
| p_args | Unevaluated argument list (f arg1 ... args). |
Evaluate each expression sequentially, blocking between evaluations. x-lang: (atomic expr ...)
| p_base | Base (execution context). |
| p_args | Unevaluated argument list of expressions. |
Return the current base (execution context) object. x-lang: (base)
| p_base | Base (execution context). |
| p_args | Unused. |
Register core primitives into the environment.
Binds: pair, first, rest, apply, eval, eval!, tail-eval, wrap, unwrap, atomic, base.
| p_base | Base (execution context). |
| p_args | Unused. |
Evaluate an expression, optionally in a given environment. x-lang: (eval expr [env])
| p_base | Base (execution context). |
| p_args | Unevaluated argument list (expr [env]). |
Evaluate expression immediately in the current environment. x-lang: (eval! expr)
| p_base | Base (execution context). |
| p_args | Unevaluated argument list (expr). |
Return the first element of a pair. x-lang: (first x)
| p_base | Base (execution context). |
| p_args | Unevaluated argument list (x). |
Construct a pair from two values. x-lang: (pair a b)
| p_base | Base (execution context). |
| p_args | Unevaluated argument list (a b). |
Return the rest (tail) of a pair. x-lang: (rest x)
| p_base | Base (execution context). |
| p_args | Unevaluated argument list (x). |
TCO-compatible eval: set expression and environment for tail-call trampoline. x-lang: (tail-eval expr env)
| p_base | Base (execution context). |
| p_args | Unevaluated argument list (expr env). |
Extract the underlying combiner from an applicative. x-lang: (unwrap applicative)
| p_base | Base (execution context). |
| p_args | Unevaluated argument list (applicative). |
Wrap a combiner to create an applicative (args evaluated before call). x-lang: (wrap combiner)
| p_base | Base (execution context). |
| p_args | Unevaluated argument list (combiner). |