Combinators for Message-Passing in Haskell

  • Neil C. C. Brown
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6539)


Much code in message-passing programs is tedious, verbose wiring code. This code is error prone and laborious – and tends to be repeated across many programs with only slight variations. By using type-classes, higher-order and monadic functions in Haskell, most of this code can be captured in re-usable high-level combinators that shorten and simplify message-passing programs. We motivate the design and use of these combinators via an example of a concurrent biological simulation, and explain their implementation in the Communicating Haskell Processes library.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bjesse, P., Claessen, K., Sheeran, M., Singh, S.: Lava: hardware design in Haskell. In: ICFP 1998, pp. 174–184. ACM, New York (1998)Google Scholar
  2. 2.
    Brown, N.C.C.: Communicating Haskell Processes: Composable explicit concurrency using monads. In: Communicating Process Architectures 2008, pp. 67–83 (September 2008)Google Scholar
  3. 3.
    Brown, N.C.C.: Conjoined Events. In: Advances in Message Passing. ACM, New York (2010)Google Scholar
  4. 4.
    Chaudhuri, A.: A concurrent ML library in concurrent Haskell. In: ICFP 2009, pp. 269–280. ACM, New York (2009)Google Scholar
  5. 5.
    Elliott, C.M.: Push-pull functional reactive programming. In: Haskell 2009, pp. 25–36. ACM, New York (2009)Google Scholar
  6. 6.
    Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall, Englewood Cliffs (1985)zbMATHGoogle Scholar
  7. 7.
    Hughes, J.: Generalising monads to arrows. Sci. Comput. Program. 37(1-3), 67–111 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Jadud, M., Jacobsen, C.L., Simpson, J., Ritson, C.G.: Safe parallelism for behavioral control. In: 2008 IEEE Conference on Technologies for Practical Robot Applications, pp. 137–142. IEEE, Los Alamitos (2008)CrossRefGoogle Scholar
  9. 9.
    Liu, H., Cheng, E., Hudak, P.: Causal commutative arrows and their optimization. In: ICFP 2009, pp. 35–46. ACM, New York (2009)Google Scholar
  10. 10.
    McBride, C., Paterson, R.: Applicative programming with effects. J. Funct. Program. 18(1), 1–13 (2008)CrossRefzbMATHGoogle Scholar
  11. 11.
    Nilsson, H., Courtney, A., Peterson, J.: Functional reactive programming, continued. In: Haskell 2002, pp. 51–64. ACM, New York (2002)Google Scholar
  12. 12.
    Peyton Jones, S.L., Wadler, P.: Imperative functional programming. In: POPL 1993, pp. 71–84. ACM, New York (1993)Google Scholar
  13. 13.
    Polack, F.A., Andrews, P.S., Sampson, A.T.: The engineering of concurrent simulations of complex systems. In: 2009 IEEE Congress on Evolutionary Computation (CEC 2009), pp. 217–224. IEEE Press, Los Alamitos (2009)CrossRefGoogle Scholar
  14. 14.
    Pucella, R., Tov, J.A.: Haskell session types with (almost) no class. In: Haskell 2008, pp. 25–36. ACM, New York (2008)Google Scholar
  15. 15.
    Reppy, J.H.: Concurrent Programming in ML. Cambridge University Press, Cambridge (1999)CrossRefzbMATHGoogle Scholar
  16. 16.
    Ritson, C.G., Sampson, A.T., Barnes, F.R.M.: Multicore Scheduling for Lightweight Communicating Processes. In: Field, J., Vasconcelos, V.T. (eds.) COORDINATION 2009. LNCS, vol. 5521, pp. 163–183. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  17. 17.
    Roscoe, A.W.: The Theory and Practice of Concurrency. Prentice-Hall, Englewood Cliffs (1997)Google Scholar
  18. 18.
    Russell, G.: Events in haskell, and how to implement them. In: ICFP 2001, pp. 157–168. ACM, New York (2001)Google Scholar
  19. 19.
    Schneider, S., Cavalcanti, A., Treharne, H., Woodcock, J.: A Layered Behavioural Model of Platelets. In: ICECCS 2006, pp. 98–106. IEEE, Los Alamitos (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Neil C. C. Brown
    • 1
  1. 1.School of ComputingUniversity of KentUK

Personalised recommendations