Skip to main content

interpret

Function interpret 

Source
pub fn interpret<I: Tree<Native>, O: Tree<Trace>>(
    f: impl FnOnce(I::On<Trace>) -> O,
    input: &I,
) -> O::On<Native>
Expand description

Traces f and runs the IR with the interpreter on input, returning the output as Native values. Useful to check that a program gives the same results natively and as IR.

ยงPanics

Panics if the interpreter fails, which indicates a bug.