Skip to main content

Module convert

Module convert 

Source
Expand description

Bidirectional conversion between bytecode VM values and tree-walker values. Bidirectional conversion between bytecode VM values and tree-walker values.

The bytecode VM (sui_bytecode) uses VMValue / StringKeyedValue, while the tree-walker (sui_eval) uses Value / NixAttrs. This module bridges the two representations so that the VM can be wired as an alternative evaluation backend.

Functions§

eval_to_vm
Convert a tree-walker Value to a VMValue for consumption by the VM.
string_keyed_to_eval
Convert a StringKeyedValue (from the bytecode VM) to a tree-walker Value.
vm_to_eval
Convert a VMValue (with interned keys) to a tree-walker Value.