-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Allow calling a tensor of functions #196
Merged
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
126468b
feat: Allow calling a tensor of functions
croyzor 0943e68
cleanup: Remove redundant method
croyzor ead0212
refactor: Remove `FunctionTensor`
croyzor 67b6b67
new: More robust function tensor types
croyzor 1c45d47
Merge remote-tracking branch 'origin/main' into feat/tensor-call-only
croyzor 525d028
Merge remote-tracking branch 'origin/main' into feat/tensor-call-only
croyzor 8a49a3a
[fix] Substitution logic for checking tuples of functions
croyzor 99e22d5
docs: Update comments
croyzor 23b2769
refactor: Don't do anything special synthesising tuples
croyzor 3744106
Merge remote-tracking branch 'origin/main' into feat/tensor-call-only
croyzor 12153ca
fix: Revert `is_function` change for building hugr
croyzor a21a481
[refactor] Use type<->row helpers
croyzor e71321c
cleanup: Redundant code handled by generic_visit
croyzor d08e212
refactor: Remove redundant parse tensor calls
croyzor b5d5026
fix: Return the right substitution
croyzor d2267cb
fix: Throw user errors when unification fails
croyzor 661f7e1
fix: More subst fixes
croyzor 990d95f
fix: Use check_call instead of making a GlobalCall
croyzor bf73897
fix: Subst fix fixes
croyzor d7fb0ed
Simplify function tuple semantics: (f) != f
croyzor 8c6ac05
cleanup: Remove redundant test
croyzor 2e38476
cleanup: Remove redundant test
croyzor 497daf9
fix: Bug in compiling calls of tuples
croyzor e70a7ac
cleanup: Remove special case for function tuples
croyzor 88c4bf3
test: Add tests of calling tuple variables
croyzor 39a9d72
new: Handle nested function tuples when compiling
croyzor 69b8c59
Complain when we have to instantiate in tuple call
croyzor 70e3db3
cleanup: Remove TensorCall node
croyzor 7a87729
Merge remote-tracking branch 'origin/main' into feat/tensor-call-only
croyzor 7a12f75
cleanup: Undo changes adding _with_leftovers fns
croyzor 87f404c
test: Add tests for function tensor errors
croyzor 16fd3b5
Update guppylang/compiler/expr_compiler.py
croyzor 22f2cc6
big_subst -> subst
croyzor b3fe317
refactor: check for parametrized fns earlier
croyzor 34c1953
Revert "cleanup: Remove TensorCall node"
croyzor b0de9a8
refactor: Bring back a TensorCall for compiling
croyzor e1a9bfa
Merge remote-tracking branch 'origin/main' into feat/tensor-call-only
croyzor 219fd96
fix: Add out_tys to TensorCall; pack correct types
croyzor b89275d
tests: Add a test
croyzor e68fe5c
fix: Add missing loc to poly tensor errors
croyzor 45b62b4
fix: Remove file path in golden test
croyzor 611b84d
Update guppylang/checker/expr_checker.py
croyzor f618f66
refactor: Simplify type synth logic for tuple calls
croyzor 36d98df
feat: Change check_call location for better errors
croyzor 7c73c10
fix: Add missing out_tys param in synth TensorCall
croyzor 0373dc6
cleanup: Remove duplicate checks
croyzor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to note: An empty
function_elements
lists also evaluate toFalse
which means we can't call empty tuples. But I think that's fine, the expression()()
isn't that useful :D