-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor!: rename HugrView
function type methods + simplify behaviour
#1265
Conversation
@@ -326,14 +326,15 @@ pub enum ConstTypeError { | |||
|
|||
/// Hugrs (even functions) inside Consts must be monomorphic | |||
fn mono_fn_type(h: &Hugr) -> Result<FunctionType, ConstTypeError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function just matches existing behaviour - this PR does not address the question of what a valid monomorphic function value hugr root type is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The failed test should get fixed with #1263.
Mermaid rendering was not considered a breaking chance :/
Closes #957 - `mono_fn_type` now enforces function value monomorphism - get_df_function_type -> inner_function_type so it matches the actual op function being called more obviously. - The culprit `get_function_type` changed to `poly_func_type` which _only_ reports polymorphic typr from func defn/decl refactor(hugr-core): rename `get_df_function_type` BREAKING-CHANGE: rename `get_df_function_type` to `inner_function_type` refactor(hugr-core): `get_function_type` replaced with `poly_func_type` which only reports polymorphic function type for Func(Defn/Decl) rooted HUGRs
LGTM, thanks @ss2165 |
## 🤖 New release * `hugr`: 0.6.1 -> 0.7.0 * `hugr-core`: 0.3.1 -> 0.4.0 * `hugr-passes`: 0.3.0 -> 0.4.0 * `hugr-cli`: 0.1.2 -> 0.1.3 <details><summary><i><b>Changelog</b></i></summary><p> ## `hugr` <blockquote> ## 0.7.0 (2024-07-10) ### Bug Fixes - Bring back input_extensions serialized field in rust NodeSer ([#1275](#1275)) - [**breaking**] `ops::Module` now empty struct rather than unit struct ([#1271](#1271)) ### Features - Add `force_order` pass. ([#1285](#1285)) - [**breaking**] `MakeOpDef` has new `extension` method. ([#1266](#1266)) ### Refactor - [**breaking**] Remove `Value::Tuple` ([#1255](#1255)) - [**breaking**] Rename `HugrView` function type methods + simplify behaviour ([#1265](#1265)) ### Styling - Change "serialise" etc to "serialize" etc. ([#1251](#1251)) ### Testing - Add a test for [#1257](#1257) ([#1260](#1260)) </blockquote> ## `hugr-core` <blockquote> ## 0.4.0 (2024-07-10) ### Bug Fixes - Bring back input_extensions serialized field in rust NodeSer ([#1275](#1275)) - [**breaking**] `ops::Module` now empty struct rather than unit struct ([#1271](#1271)) ### Features - [**breaking**] `MakeOpDef` has new `extension` method. ([#1266](#1266)) ### Refactor - [**breaking**] Remove `Value::Tuple` ([#1255](#1255)) - [**breaking**] Rename `HugrView` function type methods + simplify behaviour ([#1265](#1265)) ### Styling - Change "serialise" etc to "serialize" etc. ([#1251](#1251)) ### Testing - Add a test for [#1257](#1257) ([#1260](#1260)) </blockquote> ## `hugr-passes` <blockquote> ## 0.4.0 (2024-07-10) ### Features - Add `force_order` pass. ([#1285](#1285)) ### Refactor - [**breaking**] Remove `Value::Tuple` ([#1255](#1255)) </blockquote> ## `hugr-cli` <blockquote> ## 0.1.3 (2024-07-10) ### Styling - Change "serialise" etc to "serialize" etc. ([#1251](#1251)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/).
Closes #957
mono_fn_type
now enforces function value monomorphismget_function_type
changed topoly_func_type
which only reports polymorphic type from func defn/declBREAKING CHANGE:
get_df_function_type
toinner_function_type
get_function_type
replaced withpoly_func_type
which only reports polymorphic function type for Func(Defn/Decl) rooted HUGRs