Embedding generic monadic transformer into Scala
Ruslan Shevchenko

TL;DR
This paper introduces Dotty-cps-async, a Scala package that enables direct control flow with async/await using monadic CPS transform, simplifying asynchronous programming and higher-order function handling.
Contribution
It presents a generic monadic CPS transform integrated into Scala, allowing more natural programming constructs and automating complex call-chain and coloring transformations.
Findings
Enables direct control flow in Scala with async/await
Supports transformation of higher-order functions
Provides automatic call-chain proxy generation
Abstract
Dotty-cps-async is an open-source package that consists of scala macro, which implements generic async/await via monadic cps transform, and library, which provides monadic substitutions for higher-order functions from the standard library. It allows developers to use direct control flow constructions of the base language instead of monadic DSL for various applications. Behind well-known async/await operations, the package provides options for transforming higher-order function applications, generating call-chain proxies, and automatic coloring.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Advanced Database Systems and Queries
