This repo is a fork of scala 3 repo: original readme
This is an ongoing research project with the goal to test the limits of continuation-passing style programming in Scala 3 and check the feasibility of developing libraries that are using coroutines, generators, monadic reflection, and other similar constructs.
- Possibility to define own executors
- Reentrant coroutine state - #5
- Calling one coroutine from the body of the other - #8
- Inlining one coroutine in the body of the other
- Handling of exceptions thrown in coroutine body - #16
- Opaque coroutine state
- Composition of coroutine of different kind
- Execution plan
- calls
- assingments
- block expressions
- inlined calls
- val definitions
- simple def definitions
- nested def definitions
- type definitions
- lazy val definitions
- loops - #10
- ifs - #11
- match expressions - #12
- try/catch - #13
- early return statements - #14
- throw statements - #15
The project can be compiled and tested in the same way as dotty: instructions here.
Examples of executors definitions and coroutines can be found in the continuations
directory of run
tests. Primitives are located in the standard library and they can be imported from anywhere. Executor definitions must be, on the other hand, pasted into the sources or repl.