Skip to content

Commit

Permalink
feat: Default DFGBuilder resources to being open
Browse files Browse the repository at this point in the history
  • Loading branch information
croyzor committed Sep 4, 2023
1 parent fb1e7b8 commit e0381da
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/builder/dataflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ impl<T: AsMut<Hugr> + AsRef<Hugr>> DFGBuilder<T> {

impl DFGBuilder<Hugr> {
/// Begin building a new DFG rooted HUGR.
/// Input extensions default to being an open variable
///
/// # Errors
///
Expand All @@ -84,13 +85,9 @@ impl DFGBuilder<Hugr> {
let dfg_op = ops::DFG {
signature: signature.clone(),
};
// TODO: Allow input extensions to be specified
let base = Hugr::new(NodeType::pure(dfg_op));
let base = Hugr::new(NodeType::open_extensions(dfg_op));
let root = base.root();
DFGBuilder::create_with_io(
base, root, signature, // TODO: Make input extensions a parameter
None,
)
DFGBuilder::create_with_io(base, root, signature, None)
}
}

Expand Down

0 comments on commit e0381da

Please sign in to comment.