Trait tvix_eval::observer::CompilerObserver

source ·
pub trait CompilerObserver {
    // Provided methods
    fn observe_compiled_toplevel(&mut self, _: &Rc<Lambda>) { ... }
    fn observe_compiled_lambda(&mut self, _: &Rc<Lambda>) { ... }
    fn observe_compiled_thunk(&mut self, _: &Rc<Lambda>) { ... }
}
Expand description

Implemented by types that wish to observe internal happenings of the Tvix compiler.

Provided Methods§

source

fn observe_compiled_toplevel(&mut self, _: &Rc<Lambda>)

Called when the compiler finishes compilation of the top-level of an expression (usually the root Nix expression of a file).

source

fn observe_compiled_lambda(&mut self, _: &Rc<Lambda>)

Called when the compiler finishes compilation of a user-defined function.

Note that in Nix there are only single argument functions, so in an expression like a: b: c: ... this method will be called three times.

source

fn observe_compiled_thunk(&mut self, _: &Rc<Lambda>)

Called when the compiler finishes compilation of a thunk.

Implementors§