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

Add proper generic resolution in specialized nodes #546

Merged
merged 22 commits into from
Apr 8, 2022

Conversation

CohenArthur
Copy link
Member

What remains to do is to figure out a proper and clean way to create the specialized node, resolve its generic items, and then typecheck it before adding it to the context and specialized nodes

@CohenArthur
Copy link
Member Author

This will require a cleanup. I think a good way to think about the issue would be to split the problem into two traits: GenericUsage and GenericDeclaration. Only TypeDec, FunctionDec and TypeId can be generic "declarations"

@CohenArthur CohenArthur force-pushed the add-generic-visitor branch 2 times, most recently from 40c7908 to 33556ec Compare March 30, 2022 20:23
@CohenArthur CohenArthur force-pushed the add-generic-visitor branch from e51ed9e to 38f7ca5 Compare April 6, 2022 22:06
@CohenArthur

This comment was marked as resolved.

@CohenArthur
Copy link
Member Author

One of the problems remaining is the generation of new specialized nodes during a generic specialization phase. We need to figure out how to have proper, pretty and understandable code to do this

@CohenArthur CohenArthur force-pushed the add-generic-visitor branch 2 times, most recently from 4202c41 to a928eab Compare April 7, 2022 21:50
tests/ft/generics/generics.yml Show resolved Hide resolved
stdlib/vec.jk Show resolved Hide resolved
stdlib/vec.jk Show resolved Hide resolved
@CohenArthur CohenArthur force-pushed the add-generic-visitor branch 2 times, most recently from cb3d847 to 2dbeaa8 Compare April 7, 2022 22:33
@CohenArthur
Copy link
Member Author

Let's clean this up and merge it - It's getting really big and it's in a nice state of implementation right now. We can open up subsequent, smaller PRs for the remaining items of the issue

@CohenArthur CohenArthur added enhancement New feature or request generics Issue with generic types labels Apr 8, 2022
@CohenArthur CohenArthur force-pushed the add-generic-visitor branch from aa4fcb8 to 694512a Compare April 8, 2022 21:45
@CohenArthur CohenArthur merged commit fb28c4b into master Apr 8, 2022
@CohenArthur CohenArthur deleted the add-generic-visitor branch April 8, 2022 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request generics Issue with generic types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant