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

Generic function definitions #522

Closed
mark-koch opened this issue Oct 2, 2024 · 0 comments · Fixed by #618 or #646
Closed

Generic function definitions #522

mark-koch opened this issue Oct 2, 2024 · 0 comments · Fixed by #618 or #646
Assignees
Labels
enhancement New feature or request

Comments

@mark-koch
Copy link
Collaborator

No description provided.

@mark-koch mark-koch added the enhancement New feature or request label Oct 2, 2024
@mark-koch mark-koch self-assigned this Oct 2, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 14, 2024
Allow function definitions that are generic over parameters of kind
`type` or `nat`.

* Store currently available type parameters in the type checking context
* Refactor type parsing logic to explicitly opt in to add free variables
to the parameter mapping
* Add a new `GenericParamValue` AST node to represent usages of generic
nat params `n` inside function bodies. We need a way to encode this in
Hugr. For now, we just emit a dummy node. See
CQCL/hugr#1629

Note: Nested generic functions are not supported yet, so we don't have
to worry about scoping of type params.

Closes #522
github-merge-queue bot pushed a commit that referenced this issue Nov 15, 2024
🤖 I have created a release *beep* *boop*
---


## [0.13.1](v0.13.0...v0.13.1)
(2024-11-15)


### Features

* Generic function definitions
([#618](#618))
([7519b90](7519b90)),
closes [#522](#522)
* mem_swap function for swapping two inout values
([#653](#653))
([89e10a5](89e10a5))


### Bug Fixes

* Fix generic array functions
([#630](#630))
([f4e5655](f4e5655))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant