Expand description
Built-in functions over already-evaluated values.
show is NOT here — output is an engine concern. Arity is checked by the
caller BEFORE evaluating arguments (via check_arity) to preserve the
tree-walker’s error ordering: a wrong-arity call reports the arity error
even when an argument expression would itself error.
Enums§
- Builtin
Effect - What calling a builtin can do beyond computing its result — the fact the effect analysis
(
optimize::effects) needs to reason about a call it cannot look inside. - Builtin
Id
Constants§
- BEGIN_
PAINT_ RETIRED - What a call to
beginPaintis refused with, on every tier. - MOVE_
CHILDREN_ RETIRED - What a call to
moveChildrenis refused with, on every tier. - RETIRED_
BUILTINS - Every builtin the language no longer has: its id, which keeps its wire position, the spelling a program called it by, and the sentence that call is refused in.
Functions§
- builtin_
from_ name - Resolve a function name to a builtin, if it is one.
- call_
builtin - check_
arity - Check the call’s arity BEFORE evaluating arguments.
formataccepts any arity (it reads only its first argument, or none). - contract_
reason_ text - The text a broken contract reports: its
, otherwisereason, which must be Text. Shared by the tree-walker and the VM so both refuse a non-Text reason with the same words. - inspect_
unhandled_ message - The loud message for a non-exhaustive
Inspect: noWhenarm matched the scrutinee’s ACTUAL variant and there was noOtherwise— gauntlet finding G5. Shared by the tree-walker and the VM so a mistyped arm (When Err (message):against aJsonResult, whose real variant isJErr) fails with the identical words wherever it runs, naming the value it actually got rather than the value-agnostic “the value” this message used to say before either tier could reach the runtime value that trapped it (current_site/Stmt::Sitealready gives both tiers the sentence’s own location on top of this, through the ordinary runtime-failure path — this message is only the “what”, not the “where”). - random_
int randomInt(lo, hi)— a uniform draw fromlo..=hithrough the one system seam (a sealed test world decides it), or the refusal of a range whose low bound is above its high bound, which every host words alike.- retired_
builtin - The sentence a call to a builtin the language no longer has is refused in, before the program
runs;
Nonefor every other name. A program that defines a function of the same name calls its own. - rust_
only_ native - The natives the Rust backends link from
logicaffeine_systemand no other engine runs, as(module, function): the FIPS-202 hashes, which a program declares native to take the Rust implementation in place of crypto.lg’s pure-LOGOS sponge. The Rust backends’ table reads this, and every other engine refuses a call to one by the Rust function it names. - system_
native - The standard library’s system natives that run through
call_builtin— file.lg’sreadandwrite, random.lg’srandomIntandrandomFloat, env.lg’sget, time.lg’snow— by name and arity. The one table the tree-walker and the VM compiler both consult, so a native cannot be wired on one tier and fall through to its empty body on the other. A caller asks it only for a## To nativedeclaration: a program’s own function of the same name always wins. - unimplemented_
native - What a call to a
## To nativedeclaration no engine implements is refused with, on every tier. A declaration naming a Rust path (is native "crate::module::function"), or a native only the Rust backends link (rust_only_native), runs only where Rust links it, asEscape to Rust:does; one naming no path and no system native is the Rust backends’ own compile-time refusal, in their words. - vfs_
read_ failure - Read a
Seq of Intas raw bytes (each element masked to 0–255) — the byte-array convention the UUID/hash builtins share withuuid.lgso the version constructors can be written in LOGOS. Why a file statement’s read of the sandboxed file system fails, as every tier reports it. - vfs_
write_ failure - Why a file statement’s write to the sandboxed file system fails, as every tier reports it.