dotty-cps-async

async/await macros based on optimised monadic cps transform

License

License

GroupId

GroupId

com.github.rssh
ArtifactId

ArtifactId

dotty-cps-async_0.27
Last Version

Last Version

0.2.1-RC1
Release Date

Release Date

Type

Type

jar
Description

Description

dotty-cps-async
async/await macros based on optimised monadic cps transform
Project URL

Project URL

https://github.com/rssh/dotty-cps-async
Project Organization

Project Organization

rssh
Source Code Management

Source Code Management

https://github.com/rssh/dotty-cps-async

Download dotty-cps-async_0.27

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.rssh/dotty-cps-async_0.27/ -->
<dependency>
    <groupId>com.github.rssh</groupId>
    <artifactId>dotty-cps-async_0.27</artifactId>
    <version>0.2.1-RC1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.rssh/dotty-cps-async_0.27/
implementation 'com.github.rssh:dotty-cps-async_0.27:0.2.1-RC1'
// https://jarcasting.com/artifacts/com.github.rssh/dotty-cps-async_0.27/
implementation ("com.github.rssh:dotty-cps-async_0.27:0.2.1-RC1")
'com.github.rssh:dotty-cps-async_0.27:jar:0.2.1-RC1'
<dependency org="com.github.rssh" name="dotty-cps-async_0.27" rev="0.2.1-RC1">
  <artifact name="dotty-cps-async_0.27" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.rssh', module='dotty-cps-async_0.27', version='0.2.1-RC1')
)
libraryDependencies += "com.github.rssh" % "dotty-cps-async_0.27" % "0.2.1-RC1"
[com.github.rssh/dotty-cps-async_0.27 "0.2.1-RC1"]

Dependencies

compile (1)

Group / Artifact Type Version
ch.epfl.lamp : dotty-library_0.27 jar 0.27.0-RC1

test (1)

Group / Artifact Type Version
com.novocode : junit-interface jar 0.11

Project Modules

There are no modules declared in this project.

dotty-cps-async

This is the implementation of async/await transformation for Dotty (next version of the Scala programming language), based on an optimized version of cps[continuation passing style] transformation, where continuation is ‘pushed’ to the monad.

Highlightings:

  • Full support of all scala language constructs in async/await block.
  • Pluggable monad interface:
    • An await monad can be any trait, for which it is possible to implement CpsAsyncMonad typeclass. You can provide those methods for your favorite monad.
  • Limited support of high-order functions:
    • urls.map(fetchData(_))(await _ ) is an idiomatic way to fetch data for all items in parallel.
    • An application developer or library author can provide 'shifted' implementation of the own high-order functions.
  • Optional features, which enhance ergonomics in some cases, such as automatic coloring and handling discarded values
  • Optional SIP-22 compatible API.

For more details, please, look at the documentation: https://rssh.github.io/dotty-cps-async/

Currently, doty-cps-async is at an early stage and not ready for production use. There are many things, which not work yet. You can help to develop by providing test cases and implementing missing parts.

Presentations

Versions

Version
0.2.1-RC1
0.2.0-RC1