Add Spore0 - #35
Merged
Merged
Conversation
Contributor
Author
|
Closes #30 |
phaller
requested changes
Apr 10, 2026
| * @param ev1 | ||
| * The implicit `Spore0[F, F[E1]]` used for packing the `env`. | ||
| * @tparam E1 | ||
| * The type of the value applied to the packed closure. |
Owner
There was a problem hiding this comment.
I think here it should say: "The type of the value the packed closure is applied to."
| * both are individually unwrapped and applied to each other. | ||
| * | ||
| * @param env | ||
| * The value applied to the packed closure. |
Owner
There was a problem hiding this comment.
I think here it should say: "The value the packed closure is applied to."
| * unwrapping, both are individually unwrapped and applied to each other. | ||
| * | ||
| * @param env | ||
| * The context value applied to the packed closure. |
Owner
There was a problem hiding this comment.
I think here it should say: "The context value the packed closure is applied to."
| * @param ev1 | ||
| * The implicit `Spore0[F, F[E1]]` used for packing the `env`. | ||
| * @tparam E1 | ||
| * The type of the context value applied to the packed closure. |
Owner
There was a problem hiding this comment.
I think here it should say: "The type of the context value the packed closure is applied to."
| * | ||
| * This avoids the need to pack the `env` as it already is a Spore. | ||
| * | ||
| * Only available if the wrapped closure of type `T` is a subtype of `T1 ?=> |
Owner
There was a problem hiding this comment.
Typo, it should be: "is a subtype of `E1 ?=>"
- Add `Spore0[F[_], +T]` parameterized by evidence type F - `Spore[+T]` now implemented as type alias of `Spore0[ReadWriter, T]` - `Duplicate` replaced by `Spore0[Duplicable, T]` - `.unwrap()` replaced by `.get()` - Update test cases - Add test cases for sample module - Fix PR comments
Contributor
Author
|
Fixed the requested changes. |
phaller
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds Spore0 parameterized by evidence type F:
Spore0[F[_], +T].A Spore is now implemented as a type alias thereof:
type Spore[+T] = Spore0[ReadWriter, T].Similarly,
Duplicateis replaced bySpore0[Duplicable, T].Further changes include:
.unwrap()replaced by.get();update test cases;
and new test cases for the sample module.
Additionally, the builder syntax has been replaced:
Old:
New: