Skip to content
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

fix: Register the type parameters as custom types #101

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

aborgna-q
Copy link
Collaborator

Fixes the errors found in #98 by registering the opaque TypeParams as custom types in the extensions.

@acl-cqc Is this the intended way to register parameters? There are no uses of TypeParam::Opaque in Hugr to base this on.

Copy link
Contributor

@lmondada lmondada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks like voodoo magic to me but whatever 😅

@aborgna-q
Copy link
Collaborator Author

Perhaps it's not the clearest API :P

@aborgna-q
Copy link
Collaborator Author

I'll merge this now so we can get the Hugr update working. We can change it later if there's a better way to define things.

@aborgna-q aborgna-q merged commit 98508ed into build/update-hugr Sep 13, 2023
6 checks passed
@aborgna-q aborgna-q deleted the build/update-hugr-fix branch September 13, 2023 10:39
@acl-cqc
Copy link
Contributor

acl-cqc commented Sep 13, 2023

Yes, this looks right to me @aborgna-q @lmondada. API suggestions are welcome, but the essence is that you can't just create CustomType's that refer to meaningless names - you have to declare those names as TypeDef's in the Extension so that we can find the definition referred to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants