-
Notifications
You must be signed in to change notification settings - Fork 46
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
Union type as ADT argument #37
Comments
I wonder if this is similar to #34 - wouldn't surprise me if we could simplify the handling of ADTs and their unification while solving both, it's a bit heavy-handed at the moment. I'm going to try to find some time to sort out #25 over the next week (I suspect it's just a case of furthering generalization) and then tackle this (unless it's already solved by then ;) ) |
I have a prototypical fix here: master...danabr:fix/complex-types I say "prototypical", because the code needs cleanup, and I'm not sure I should do type lookup like this. It also happens to fix the example in #34, but there are more complex ways to use aliases than that example which I'm sure will break even with this simple fix. |
I've updated the complex-types branch with something that works even for type aliases and type unions. However, there is something weird going on. |
Closing due to PR #49 |
The following test case fails:
Error:
It seems like the knowledge about what members are in the union got lost along the way.
This is the line reporting the error: https://github.com/j14159/mlfe/blob/master/src/mlfe_typer.erl#L557
The text was updated successfully, but these errors were encountered: