From 1187707f37d622531d90c8beed099df079af23b9 Mon Sep 17 00:00:00 2001 From: Seyon Sivarajah Date: Mon, 25 Sep 2023 11:52:09 +0100 Subject: [PATCH] export `PullForwardError` to python --- pyrs/src/lib.rs | 4 ++++ src/passes.rs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/pyrs/src/lib.rs b/pyrs/src/lib.rs index 9526f4bf..146c36f7 100644 --- a/pyrs/src/lib.rs +++ b/pyrs/src/lib.rs @@ -71,6 +71,10 @@ fn add_pass_module(py: Python, parent: &PyModule) -> PyResult<()> { let m = PyModule::new(py, "passes")?; m.add_function(wrap_pyfunction!(greedy_depth_reduce, m)?)?; m.add_class::()?; + m.add( + "PullForwardError", + py.get_type::(), + )?; parent.add_submodule(m)?; Ok(()) } diff --git a/src/passes.rs b/src/passes.rs index 7ca2cc90..b2339f09 100644 --- a/src/passes.rs +++ b/src/passes.rs @@ -6,6 +6,8 @@ // pub mod squash; mod commutation; pub use commutation::apply_greedy_commutation; +#[cfg(feature = "pyo3")] +pub use commutation::PyPullForwardError; // use rayon::prelude::*;