Type-directed language extension for effectful computations
Paper i proceeding, 2014

Computation types such as functors, applicative functors and monads have become common abstractions for modeling effectful computations in functional programming languages. They are often used together with special language extensions intended to simplify the syntax of monadic expressions. We can simplify it even more by employing types rather than just mechanical syntactic transformation. In this paper we present scala-workflow, a macro-based extension to the Scala programming language that offers uniform syntax for structuring effectful computations expressed as abstract interfaces with a stackable set of combinators. Unlike similar syntactic extensions, such as F#'s computation expressions, Haskell's do-notation and Scala's own for-expressions, scala-workflow allows users to transparently blend pure and effectful functions in a bounded context, as they are separated during macro expansion based on the types of subexpressions.

Effects

Monads

Scala

Functors

Macros

Författare

Evgenii Kotelnikov

Chalmers, Data- och informationsteknik, Programvaruteknik

SCALA 2014 - Proceedings of the 5th Annual Scala Workshop, Co-located with ECOOP 2014

35-43
978-145032868-5 (ISBN)

Ämneskategorier

Data- och informationsvetenskap

DOI

10.1145/2637647.2637648

ISBN

978-145032868-5

Mer information

Skapat

2017-10-08