CQCL / guppylang

Pythonic quantum-classical programming language
https://pypi.org/project/guppylang
Apache License 2.0
33 stars 3 forks source link

feat: Generic function definitions #618

Closed mark-koch closed 5 days ago

mark-koch commented 2 weeks ago

Allow function definitions that are generic over parameters of kind type or nat.

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

Closes #522

codecov-commenter commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 90.74074% with 5 lines in your changes missing coverage. Please review.

Project coverage is 92.61%. Comparing base (f527703) to head (5efa146).

Files with missing lines Patch % Lines
guppylang/checker/expr_checker.py 84.61% 2 Missing :warning:
guppylang/tys/parsing.py 85.71% 2 Missing :warning:
guppylang/tys/printing.py 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #618 +/- ## ========================================== + Coverage 92.45% 92.61% +0.15% ========================================== Files 66 66 Lines 7465 7487 +22 ========================================== + Hits 6902 6934 +32 + Misses 563 553 -10 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.