-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add support for parsing polymorphic type declarations #1355
Conversation
As is always the case with changes to the parser, nearly all the lines in the diff are from updates to fixtures and the generated parser code. |
699d77c
to
c79a8cf
Compare
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.
I can't wait to start using this!
Just left a few comments, specially on the ToIRListener
where we should have fallbacks to enable error recovery on this stage of parsing.
Co-authored-by: Gabriela Moreira <gabrielamoreira05@gmail.com>
Co-authored-by: Gabriela Moreira <gabrielamoreira05@gmail.com>
Closes #1296
Adds support for two new kinds in the types IR:
Closes #1297
Adds support for parsing polymorphic type declarations and type constructor application. This enables forming types of the kinds above as follows:
Type abstractions is produced only by type declarations of the following form:
Similar to operator declarations, there are parsed into the assignment of a name to an abstraction. I.e., in this case,
T = Λ(a, b).(a,b)
Type application generalizes our current special-cased support for
List
andSet
. E.g., we apply the polymorphicT
defined above asT[int, str]
.