Skip to content

Commit

Permalink
s/hugr_core::/hugr::/ in all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed May 28, 2024
1 parent 008e635 commit dc4341b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions hugr-core/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
//! `CircuitBuilder`.
//!
//! ```rust
//! # use hugr_core::Hugr;
//! # use hugr_core::builder::{BuildError, BuildHandle, Container, DFGBuilder, Dataflow, DataflowHugr, ModuleBuilder, DataflowSubContainer, HugrBuilder};
//! use hugr_core::extension::prelude::BOOL_T;
//! use hugr_core::std_extensions::logic::{NotOp, LOGIC_REG};
//! use hugr_core::types::FunctionType;
//! # use hugr::Hugr;
//! # use hugr::builder::{BuildError, BuildHandle, Container, DFGBuilder, Dataflow, DataflowHugr, ModuleBuilder, DataflowSubContainer, HugrBuilder};
//! use hugr::extension::prelude::BOOL_T;
//! use hugr::std_extensions::logic::{NotOp, LOGIC_REG};
//! use hugr::types::FunctionType;
//!
//! # fn doctest() -> Result<(), BuildError> {
//! let hugr = {
Expand Down
4 changes: 2 additions & 2 deletions hugr-core/src/extension/declarative.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
//! The definition can be loaded into a registry using the [`load_extensions`] or [`load_extensions_file`] functions.
//! ```rust
//! # const DECLARATIVE_YAML: &str = include_str!("../../../hugr/examples/extension/declarative.yaml");
//! # use hugr_core::extension::declarative::load_extensions;
//! # use hugr::extension::declarative::load_extensions;
//! // Required extensions must already be present in the registry.
//! let mut reg = hugr_core::std_extensions::logic::LOGIC_REG.clone();
//! let mut reg = hugr::std_extensions::logic::LOGIC_REG.clone();
//! load_extensions(DECLARATIVE_YAML, &mut reg).unwrap();
//! ```
//!
Expand Down
6 changes: 3 additions & 3 deletions hugr-core/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ pub(crate) use impl_box_clone;
///
/// Example:
/// ```
/// # use hugr_core::macros::type_row;
/// # use hugr_core::types::{FunctionType, Type, TypeRow};
/// # use hugr::type_row;
/// # use hugr::types::{FunctionType, Type, TypeRow};
/// const U: Type = Type::UNIT;
/// let static_row: TypeRow = type_row![U, U];
/// let dynamic_row: TypeRow = vec![U, U, U].into();
Expand Down Expand Up @@ -86,7 +86,7 @@ pub use type_row;
/// of a test module only. Example:
/// ```rust
/// # mod test {
/// # use hugr_core::macros::const_extension_ids;
/// # use hugr::const_extension_ids;
/// const_extension_ids! {
/// pub const EXT_A: ExtensionId = "A";
/// /// A doc comment
Expand Down
16 changes: 8 additions & 8 deletions hugr-core/src/ops/dataflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ impl Call {
/// This matches [`OpType::static_input_port`].
///
/// ```
/// # use hugr_core::ops::dataflow::Call;
/// # use hugr_core::ops::OpType;
/// # use hugr_core::types::FunctionType;
/// # use hugr_core::extension::prelude::QB_T;
/// # use hugr_core::extension::PRELUDE_REGISTRY;
/// # use hugr::ops::dataflow::Call;
/// # use hugr::ops::OpType;
/// # use hugr::types::FunctionType;
/// # use hugr::extension::prelude::QB_T;
/// # use hugr::extension::PRELUDE_REGISTRY;
/// let signature = FunctionType::new(vec![QB_T, QB_T], vec![QB_T, QB_T]);
/// let call = Call::try_new(signature.into(), &[], &PRELUDE_REGISTRY).unwrap();
/// let op = OpType::Call(call.clone());
Expand Down Expand Up @@ -308,9 +308,9 @@ impl LoadConstant {
/// This matches [`OpType::static_input_port`].
///
/// ```
/// # use hugr_core::ops::dataflow::LoadConstant;
/// # use hugr_core::ops::OpType;
/// # use hugr_core::types::Type;
/// # use hugr::ops::dataflow::LoadConstant;
/// # use hugr::ops::OpType;
/// # use hugr::types::Type;
/// let datatype = Type::UNIT;
/// let load_constant = LoadConstant { datatype };
/// let op = OpType::LoadConstant(load_constant.clone());
Expand Down
6 changes: 3 additions & 3 deletions hugr-core/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,15 @@ impl TypeEnum {
///
/// Examples:
/// ```
/// # use hugr_core::types::{Type, TypeBound};
/// # use hugr_core::type_row;
/// # use hugr::types::{Type, TypeBound};
/// # use hugr::type_row;
///
/// let sum = Type::new_sum([type_row![], type_row![]]);
/// assert_eq!(sum.least_upper_bound(), TypeBound::Eq);
/// ```
///
/// ```
/// # use hugr_core::types::{Type, TypeBound, FunctionType};
/// # use hugr::types::{Type, TypeBound, FunctionType};
///
/// let func_type = Type::new_function(FunctionType::new_endo(vec![]));
/// assert_eq!(func_type.least_upper_bound(), TypeBound::Copyable);
Expand Down

0 comments on commit dc4341b

Please sign in to comment.