-
Notifications
You must be signed in to change notification settings - Fork 6
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!: Bring the collections ext in line with other extension defs #1469
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1469 +/- ##
==========================================
- Coverage 87.68% 87.65% -0.04%
==========================================
Files 121 122 +1
Lines 20806 20819 +13
Branches 17949 17962 +13
==========================================
+ Hits 18243 18248 +5
- Misses 1794 1800 +6
- Partials 769 771 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
} | ||
|
||
/// Returns a generic unbounded type for a list element. | ||
fn elem_type(self) -> Type { |
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 doesn't need to be a method
## 🤖 New release * `hugr`: 0.11.0 -> 0.12.0 * `hugr-core`: 0.8.0 -> 0.9.0 * `hugr-passes`: 0.7.0 -> 0.8.0 * `hugr-cli`: 0.4.0 -> 0.5.0 <details><summary><i><b>Changelog</b></i></summary><p> ## `hugr` <blockquote> ## 0.12.0 (2024-08-30) ### Features - [**breaking**] Disallow opaque ops during validation ([#1431](#1431)) - [**breaking**] Add collections to serialized standard extensions ([#1452](#1452)) - [**breaking**] Variadic logic ops now binary ([#1451](#1451)) - [**breaking**] Int operations other than widen/narrow have only one width arg ([#1455](#1455)) - Add a `FuncTypeBase::io` method ([#1458](#1458)) - Add missing ops ([#1463](#1463)) - [**breaking**] Move `Lift`, `MakeTuple`, `UnpackTuple` and `Lift` to prelude ([#1475](#1475)) - `Option` / `Result` helpers ([#1481](#1481)) - [**breaking**] Add more list operations ([#1474](#1474)) - [**breaking**] Move int conversions to `conversions` ext, add to/from usize ([#1490](#1490)) - Fill out array ops ([#1491](#1491)) ### Refactor - [**breaking**] Bring the collections ext in line with other extension defs ([#1469](#1469)) - [**breaking**] Make Either::Right the "success" case ([#1489](#1489)) - [**breaking**] Flatten `CustomOp` in to `OpType` ([#1429](#1429)) ### Testing - Add serialization benchmarks ([#1439](#1439)) </blockquote> ## `hugr-core` <blockquote> ## 0.9.0 (2024-08-30) ### Features - [**breaking**] Disallow opaque ops during validation ([#1431](#1431)) - [**breaking**] Add collections to serialized standard extensions ([#1452](#1452)) - [**breaking**] Variadic logic ops now binary ([#1451](#1451)) - [**breaking**] Int operations other than widen/narrow have only one width arg ([#1455](#1455)) - Add a `FuncTypeBase::io` method ([#1458](#1458)) - Add missing ops ([#1463](#1463)) - [**breaking**] Move `Lift`, `MakeTuple`, `UnpackTuple` and `Lift` to prelude ([#1475](#1475)) - `Option` / `Result` helpers ([#1481](#1481)) - [**breaking**] Add more list operations ([#1474](#1474)) - [**breaking**] Move int conversions to `conversions` ext, add to/from usize ([#1490](#1490)) - Fill out array ops ([#1491](#1491)) ### Refactor - [**breaking**] Flatten `CustomOp` in to `OpType` ([#1429](#1429)) - [**breaking**] Bring the collections ext in line with other extension defs ([#1469](#1469)) - [**breaking**] Make Either::Right the "success" case ([#1489](#1489)) </blockquote> ## `hugr-passes` <blockquote> ## 0.8.0 (2024-08-30) ### Features - [**breaking**] Variadic logic ops now binary ([#1451](#1451)) - [**breaking**] Int operations other than widen/narrow have only one width arg ([#1455](#1455)) - [**breaking**] Move `Lift`, `MakeTuple`, `UnpackTuple` and `Lift` to prelude ([#1475](#1475)) - [**breaking**] Add more list operations ([#1474](#1474)) - [**breaking**] Move int conversions to `conversions` ext, add to/from usize ([#1490](#1490)) ### Refactor - [**breaking**] Flatten `CustomOp` in to `OpType` ([#1429](#1429)) - [**breaking**] Bring the collections ext in line with other extension defs ([#1469](#1469)) - [**breaking**] Make Either::Right the "success" case ([#1489](#1489)) </blockquote> ## `hugr-cli` <blockquote> ## 0.5.0 (2024-08-30) ### Features - [**breaking**] Add collections to serialized standard extensions ([#1452](#1452)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/).
Refactors the list operations definition so it's easier to add new ones (#1467), and to bring it in line with the other extension definitions.
camelCase
, to match their op names. This lets us usstrum
to auto-derive all the string conversions.MakeOpDef
,MakeRegisteredOp
,BREAKING CHANGE: Renamed
ListOp
variants to camelCase.collections::EXTENSION_NAME
is now calledEXTENSION_ID
.