diff --git a/hugr-core/src/ops/constant.rs b/hugr-core/src/ops/constant.rs index bb9889bfe..a20d29cd0 100644 --- a/hugr-core/src/ops/constant.rs +++ b/hugr-core/src/ops/constant.rs @@ -26,8 +26,9 @@ pub use custom::{ #[non_exhaustive] #[cfg_attr(test, derive(proptest_derive::Arbitrary))] pub struct Const { + /// The [Value] of the constant. #[serde(rename = "v")] - value: Value, + pub value: Value, } impl Const { diff --git a/hugr-core/src/ops/dataflow.rs b/hugr-core/src/ops/dataflow.rs index 54202ffc0..0f2ad9d75 100644 --- a/hugr-core/src/ops/dataflow.rs +++ b/hugr-core/src/ops/dataflow.rs @@ -158,10 +158,12 @@ impl StaticTag for T { #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] #[cfg_attr(test, derive(Arbitrary))] pub struct Call { - /// Signature of function being called - func_sig: PolyFuncType, - type_args: Vec, - instantiation: FunctionType, // Cache, so we can fail in try_new() not in signature() + /// Signature of function being called. + pub func_sig: PolyFuncType, + /// The type arguments that instantiate `func_sig`. + pub type_args: Vec, + /// The instantiation of `func_sig`. + pub instantiation: FunctionType, // Cache, so we can fail in try_new() not in signature() } impl_op_name!(Call); @@ -329,9 +331,11 @@ impl LoadConstant { #[cfg_attr(test, derive(Arbitrary))] pub struct LoadFunction { /// Signature of the function - func_sig: PolyFuncType, - type_args: Vec, - signature: FunctionType, // Cache, so we can fail in try_new() not in signature() + pub func_sig: PolyFuncType, + /// The type arguments that instantiate `func_sig`. + pub type_args: Vec, + /// The instantiation of `func_sig`. + pub signature: FunctionType, // Cache, so we can fail in try_new() not in signature() } impl_op_name!(LoadFunction); impl DataflowOpTrait for LoadFunction {