-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: New type representation with parameters (#174)
* Prepare support for types and functions that are generic over constant values (e.g. bounded nats): - Generic types and functions are now defined in terms of `Parameter`s and `Argument`s that can be either types or constants (see `tys/param.py` and `tys/arg.py`). - Implementations for `ConstParam` and `ConstArg` will follow in the future * Improved pretty printing of types (see `tys/printing.py`) * Add a notion of `TypeDefinition` (see `tys/definition.py`) that replaces the ad-hoc creation of Python classes to define new types * `BoolType` is no longer a `SumType`. This was a hugr implementation detail and not relevant for the Guppy type system. Drive by renaming: * Rename function type members from `args/return` to `inputs/output` since `args` is already used now * Rename `GuppyType` to `Type`
- Loading branch information
Showing
38 changed files
with
1,863 additions
and
1,108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.