Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Bjesse, P., Claessen, K., Sheeran, M., Singh, S.: Lava: hardware design in Haskell. In: ICFP 1998, pp. 174–184. ACM, New York (1998)
Brown, N.C.C.: Communicating Haskell Processes: Composable explicit concurrency using monads. In: Communicating Process Architectures 2008, pp. 67–83 (September 2008)
Brown, N.C.C.: Conjoined Events. In: Advances in Message Passing. ACM, New York (2010)
Chaudhuri, A.: A concurrent ML library in concurrent Haskell. In: ICFP 2009, pp. 269–280. ACM, New York (2009)
Elliott, C.M.: Push-pull functional reactive programming. In: Haskell 2009, pp. 25–36. ACM, New York (2009)
Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall, Englewood Cliffs (1985)
Hughes, J.: Generalising monads to arrows. Sci. Comput. Program. 37(1-3), 67–111 (2000)
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)
Liu, H., Cheng, E., Hudak, P.: Causal commutative arrows and their optimization. In: ICFP 2009, pp. 35–46. ACM, New York (2009)
McBride, C., Paterson, R.: Applicative programming with effects. J. Funct. Program. 18(1), 1–13 (2008)
Nilsson, H., Courtney, A., Peterson, J.: Functional reactive programming, continued. In: Haskell 2002, pp. 51–64. ACM, New York (2002)
Peyton Jones, S.L., Wadler, P.: Imperative functional programming. In: POPL 1993, pp. 71–84. ACM, New York (1993)
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)
Pucella, R., Tov, J.A.: Haskell session types with (almost) no class. In: Haskell 2008, pp. 25–36. ACM, New York (2008)
Reppy, J.H.: Concurrent Programming in ML. Cambridge University Press, Cambridge (1999)
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)
Roscoe, A.W.: The Theory and Practice of Concurrency. Prentice-Hall, Englewood Cliffs (1997)
Russell, G.: Events in haskell, and how to implement them. In: ICFP 2001, pp. 157–168. ACM, New York (2001)
Schneider, S., Cavalcanti, A., Treharne, H., Woodcock, J.: A Layered Behavioural Model of Platelets. In: ICECCS 2006, pp. 98–106. IEEE, Los Alamitos (2006)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Brown, N.C.C. (2011). Combinators for Message-Passing in Haskell. In: Rocha, R., Launchbury, J. (eds) Practical Aspects of Declarative Languages. PADL 2011. Lecture Notes in Computer Science, vol 6539. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-18378-2_4
Download citation
DOI: https://doi.org/10.1007/978-3-642-18378-2_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-18377-5
Online ISBN: 978-3-642-18378-2
eBook Packages: Computer ScienceComputer Science (R0)