Skip to content

Implement parametric polymorphism#7

Merged
Technius merged 23 commits into
masterfrom
poly-impl
Dec 30, 2019
Merged

Implement parametric polymorphism#7
Technius merged 23 commits into
masterfrom
poly-impl

Conversation

@Technius
Copy link
Copy Markdown
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