Skip to content

Add erasure of AnyHeapRef-bounded type parameters and better allocator examples - #1227

Open
gsps wants to merge 2 commits into
scala-2from
add-better-allocator-example
Open

Add erasure of AnyHeapRef-bounded type parameters and better allocator examples#1227
gsps wants to merge 2 commits into
scala-2from
add-better-allocator-example

Conversation

@gsps

@gsps gsps commented Jan 18, 2022

Copy link
Copy Markdown
Contributor

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

vkuncak commented Jan 20, 2022

Copy link
Copy Markdown
Collaborator

@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.

2 participants