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 erasure of AnyHeapRef-bounded type parameters and better allocator examples #1227

Open
wants to merge 2 commits into
base: scala-2
Choose a base branch
from

Conversation

gsps
Copy link
Contributor

@gsps gsps commented Jan 18, 2022

This PR improves upon the existing AllocatorMono example by a) adding a variant AllocatorMonoAbstract that abstracts the implementation and simply gives a model of an allocator that could feasibly be used in client code, and b) AllocatorPolyAbstract, a generic variant of the allocator.

To achieve the latter, type parameters on classes and functions upper-bounded by AnyHeapRef are now erased during EffectElaboration.

Drive-by fixes of several bugs in EffectElaboration.

@vkuncak
Copy link
Collaborator

vkuncak commented Jan 20, 2022

@gsps it is more likely to get merged if it targets main branch

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.

None yet

2 participants