diff --git a/hugr-passes/src/call_graph.rs b/hugr-core/src/call_graph.rs similarity index 98% rename from hugr-passes/src/call_graph.rs rename to hugr-core/src/call_graph.rs index 7baf8530dd..1996be3d16 100644 --- a/hugr-passes/src/call_graph.rs +++ b/hugr-core/src/call_graph.rs @@ -1,9 +1,10 @@ //! Data structure for call graphs of a Hugr use std::collections::HashMap; -use hugr_core::{HugrView, Node, core::HugrNode, ops::OpType}; use petgraph::Graph; +use crate::{HugrView, Node, core::HugrNode, ops::OpType}; + /// Weight for an edge in a [`CallGraph`] #[derive(Clone, Debug, PartialEq, Eq)] pub enum CallGraphEdge { diff --git a/hugr-core/src/lib.rs b/hugr-core/src/lib.rs index 862b8dee8a..1a471a822e 100644 --- a/hugr-core/src/lib.rs +++ b/hugr-core/src/lib.rs @@ -10,6 +10,7 @@ #![cfg_attr(coverage_nightly, feature(coverage_attribute))] pub mod builder; +pub mod call_graph; pub mod core; pub mod envelope; pub mod export; diff --git a/hugr-passes/src/lib.rs b/hugr-passes/src/lib.rs index 6e97f3422e..4d3e2e4f89 100644 --- a/hugr-passes/src/lib.rs +++ b/hugr-passes/src/lib.rs @@ -1,6 +1,7 @@ //! Compilation passes acting on the HUGR program representation. -pub mod call_graph; +#[deprecated(note = "Re-exported from hugr-core", since = "0.22.3")] +pub use hugr_core::call_graph; pub mod composable; pub use composable::ComposablePass; pub mod const_fold;