Skip to content

Commit

Permalink
total_context: return PartialValue, as need some repr of Sum
Browse files Browse the repository at this point in the history
  • Loading branch information
acl-cqc committed Oct 21, 2024
1 parent 502d4a2 commit 25c4a82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hugr-passes/src/dataflow/total_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub trait TotalContext<V>: Clone + Eq + Hash + std::ops::Deref<Target = Hugr> {
node: Node,
e: &ExtensionOp,
ins: &[(IncomingPort, Self::InterpretableVal)],
) -> Vec<(OutgoingPort, V)>;
) -> Vec<(OutgoingPort, PartialValue<V>)>;
}

impl<V: AbstractValue, T: TotalContext<V>> DFContext<V> for T {
Expand Down Expand Up @@ -53,7 +53,7 @@ impl<V: AbstractValue, T: TotalContext<V>> DFContext<V> for T {
})
.collect::<Vec<_>>();
for (p, v) in self.interpret_leaf_op(node, e, &known_ins) {
outs[p.index()] = PartialValue::Value(v);
outs[p.index()] = v;
}
}
}

0 comments on commit 25c4a82

Please sign in to comment.