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

Implement parametric polymorphism #7

Merged
merged 23 commits into from
Dec 30, 2019
Merged

Implement parametric polymorphism #7

merged 23 commits into from
Dec 30, 2019

Conversation

Technius
Copy link
Owner

Includes:

  • Parametric polymorphism in functions
  • Rank 1 type constructors
  • Fix constructor memory allocation (previously allocated 0 bytes, I think)
  • Polymorphism is implemented by passing values in a "tag"/box wrapper during runtime. Primitive values such as integers, booleans, and ADTs are boxed during conversion from AST to JoinIR.

Caveats:

  • Arguments to a function reference are not automatically boxed/unboxed yet. This requires creating wrappers for function references if boxing/unboxing is needed (e.g. a generic filter function over a concrete linked list).

@Technius Technius mentioned this pull request Dec 20, 2019
23 tasks
@Technius Technius merged commit 26b7ce7 into master Dec 30, 2019
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.

1 participant