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

type check lambdas when last op (body) is set #217

Merged
merged 6 commits into from
May 15, 2023
Merged

type check lambdas when last op (body) is set #217

merged 6 commits into from
May 15, 2023

Conversation

leissa
Copy link
Member

@leissa leissa commented May 13, 2023

  • finally type checking for mutable Lams
  • fixed bug in alpha-equiv - related to Application Error with matching domain #174?
  • fixed bug in lower_matrix_mediumlevel.cpp (wrong filter type)
  • fixed type inference for things like umax(0, ?) == 1

* fixed bug in alpha-equiv - relaged to #174?
* fixed bug in lower_matrix_mediumlevel.cpp (wrong filter type)
* still some problems when trying to infer return type of lam
@leissa leissa marked this pull request as ready for review May 14, 2023 18:42
@leissa
Copy link
Member Author

leissa commented May 14, 2023

@NeuralCoder3 can you double-check my changes in lower_matrix_mediumlevel.cpp?

@@ -250,7 +250,7 @@ Ref LowerMatrixMediumLevel::rewrite_(Ref def) {
iterator[idx] = world.call<core::bitcast>(world.type_idx(dim_nat_def), iter);
auto [new_mem, new_mat] = new_acc->projs<2>();
acc = {new_mem, new_mat};
current_mut->set(dim_nat_def, for_call);
current_mut->set(false, for_call); // TODO correct filter?
Copy link
Collaborator

@NeuralCoder3 NeuralCoder3 May 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dim_nat_def filter was wrong.
false is okay. But true as a filter should also work.
These functions just call the for-loop (they are just wrappers).
Therefore, we could always unfold the wrapper.

@leissa leissa merged commit 8574570 into master May 15, 2023
6 of 12 checks passed
@leissa leissa deleted the typechecking branch May 15, 2023 11:45
@NeuralCoder3
Copy link
Collaborator

NeuralCoder3 commented May 15, 2023

The build of bfdcd46 seems to fail. Maybe the filter can not be true?
It seems to be an unrelated problem with internet connections.

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

Successfully merging this pull request may close these issues.

None yet

2 participants