Skip to main content

Module stdlib

Module stdlib 

Source
Expand description

Standard and CommunityModules operators of the core, by TLC’s override table (dive_ir::StdOp).

The compiler asks implements for a standard operator it does not compile itself and emits Node::Lib; the evaluator evaluates the arguments (normalized) and calls call. Semantics, error points and error classes are dive-eval’s (its community and std modules), which follow TLC’s Java overrides. Where dive-eval refuses a case, so does the core.

Every operator here is pure except Print and PrintT (effectful), whose calls the compiler never folds, memoizes or skips.

Structs§

OpFn
An operator argument, compiled: its parameters’ slots and its body.

Enums§

Ho
An argument of a higher-order operator at the call.

Functions§

call
Calls op on normalized arguments.
call_ho
Calls the higher-order operator op.
effectful
Whether a call of op has an effect TLC performs once per evaluation (output, registers, randomness): such a call is never folded or memoized. Of the operators implemented here, Print and PrintT.
higher_order
Whether the core implements op here as an operator with operator arguments (Node::LibHo).
implements
Whether the core implements op here.
op_arity
The arity of argument i of a higher-order operator when it is an operator argument; None for a value argument.
takes_op_value
Whether op takes its operator argument as TLC’s OpValue, which TLC cannot apply when the operator’s body is a constant: the compiler refuses such a call.