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

Polymorphic Hugrs (values) #657

Closed
acl-cqc opened this issue Nov 8, 2023 · 2 comments
Closed

Polymorphic Hugrs (values) #657

acl-cqc opened this issue Nov 8, 2023 · 2 comments
Assignees

Comments

@acl-cqc
Copy link
Contributor

acl-cqc commented Nov 8, 2023

Will need to bind some typeparams in the Hugr (or possibly some wrapper thereof that can be stored in e.g. a Const)

@acl-cqc
Copy link
Contributor Author

acl-cqc commented Nov 12, 2023

Thinking a bit more about where TypeParams should be declared.

For a Module-level Hugr, it probably makes sense for each FuncDefn (or FuncDecl) to declare it's own TypeParams. Possibly each AliasDecl/Defn too?? But less likely each Const.

So, we could include a list of TypeParams in each of those OpTypes. This probably works for Hugrs rooted at any of those OpTypes and also for Module (i.e. there are no module-level params).

However, we'll also want TypeParams for any Hugr that is rooted at a Dfg or Cfg node (these express anonymous, non-recursive, functions, rather than named FuncDecls...right???). However, it doesn't make sense to declare TypeParams for a Dfg node that's nested within another Dfg (only one that's within a Const, or a "free Hugr" as we have many of in tests).

This was referenced Nov 12, 2023
@acl-cqc acl-cqc self-assigned this Nov 16, 2023
@acl-cqc
Copy link
Contributor Author

acl-cqc commented Dec 12, 2023

This was largely done by #692 with remainder pushed out to #708 and #709

@acl-cqc acl-cqc closed this as completed Dec 12, 2023
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

No branches or pull requests

1 participant