-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Issues in E-graph matching for parametrized types #142
Comments
I guess I have find where the problem comes from. The operation of Line 90 in c2ce9bd
However, it just compare whether the operation of a enode equals to the pattern instead of being matched with the pattern. Metatheory.jl/src/ematch_compiler.jl Line 163 in c2ce9bd
So a parameterized type will never be matched because its operation could never equals |
Thanks for reporting! This feature may be added in 2.0 branch https://github.com/JuliaSymbolics/Metatheory.jl/tree/2.0.0-DEV |
I believe that with the new pattern matcher we can now attack this easily |
I think this is also related to #87. You also can't use enums as head types (as is sometimes recommended when developing custom Julia ASTs), since those get quoted too and won't hit the special case in Line 96 in 38719ae
|
You can try adding a specialized |
It seems like the general problem here is that there isn't support for "curried" functions. That is, we'd also have trouble matching |
Here is an example.
The text was updated successfully, but these errors were encountered: