Skip to main content

Module builtins

Module builtins 

Source
Expand description

Pure stdlib builtins — string, numeric, list, option, result, json ops dispatched via the same EffectHandler interface as effects, but without policy gates (they have no observable side effects).

Functions§

call_pure_builtin
Dispatch a pure-builtin call with owned args (no clone of arg values). Callers must first verify is_pure_call(kind, op) to ensure args ownership is only transferred for known-pure ops.
is_pure_call
Returns true if (kind, op) will be handled by the pure-builtin path (no side effects, no policy gate needed). Used by the effect handler to decide whether to consume args by value.
is_pure_module
kind is one of the known pure module aliases — used by the policy walk to skip pure builtins that programs reference via imports.
try_pure_builtin
Returns Some(…) if (kind, op) names a known pure builtin. None means “not handled here; fall through to effect dispatch”.