A poor man's concurrency monad

  • Authors:
  • Koen Claessen

  • Affiliations:
  • Chalmers University of Technology (e-mail: koen@cs.chalmers.se)

  • Venue:
  • Journal of Functional Programming
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

Without adding any primitives to the language, we define a concurrency monad transformer in Haskell. This allows us to add a limited form of concurrency to any existing monad. The atomic actions of the new monad are lifted actions of the underlying monad. Some extra operations, such as fork, to initiate new processes, are provided. We discuss the implementation, and use some examples to illustrate the usefulness of this construction.