This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Conversation
This file contains 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
Examples are in the "test" class and are based on algebraic effect handlers
…continuation-tricks
A recent paper on effect systems with haskell included an implementation for delimited continuations^^
Co-authored-by: Rachel M. Carmena <rachelcarmena@users.noreply.github.com>
Co-authored-by: Rachel M. Carmena <rachelcarmena@users.noreply.github.com>
Co-authored-by: Rachel M. Carmena <rachelcarmena@users.noreply.github.com>
…continuation-tricks
raulraja
approved these changes
Aug 27, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rachelcarmena
approved these changes
Aug 27, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @rachelcarmena for helping out with the merge 🙌 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The purpose of this pr is to add the new module, which @raulraja @nomisRev and me have been working on lately, which implements delimited continuations in kotlin over suspend. (Or something very close to delimited continuations^^)
These implementations are currently split across capabilities (Nesting scopes, multishot) to provide an overview how each feature works. Ideally we'd have Nested scopes and multishot support but that is kind of complicated and thus not included.
The purpose of this pr is (if I understood @raulraja correctly 🙈) simply adding the module (and api documentation which I will add over the next days) so that further prs can change our existing fx implementations to use delimited continuations in order to slowly chop away the hacky fx code. This should not yet replace fx for nondet carriers (lists/sequences) because I do not consider the multishot included here to be ready. I will create a detailed document/issue for discussion there after this pr is merged.
At some point we also need to have a discussion between folding/binding monadic code versus providing effects directly but thats a different story altogether.
Unless @raulraja or @nomisRev have something to add I'll mark this pr as ready after adding some documentation to each implementation.
Oh and before I forget: I am pretty sure this version does not yet allow interleaving of arbitrary suspend code, so that is also something to look at.
When this pr is merged a few things should happen: