Skip to main content Module context Copy item path Source EvalContext call_callback Call a function value with arguments using the registered callback.
Panics if no callback has been registered (programming error). eval_callback Evaluate an expression using the registered evaluator.
Panics if no evaluator has been registered (programming error). set_call_callback Register the call-value callback. Called by sema-eval during interpreter init.
Stores into both ctx and the shared STDLIB_CTX. set_eval_callback Register the full evaluator callback. Called by sema-eval during interpreter init.
Stores into both ctx and the shared STDLIB_CTX so that stdlib simple-fn closures
(which lack a ctx parameter) can still invoke the evaluator. with_stdlib_ctx Get a reference to the shared stdlib EvalContext.
Use this for stdlib callback invocations instead of creating throwaway contexts. CallCallbackFn Function-pointer type for calling a function value with evaluated arguments: (ctx, func, args) -> Result<Value, SemaError> EvalCallbackFn Function-pointer type for the full evaluator callback: (ctx, expr, env) -> Result<Value, SemaError>