Skip to main content

Combinators for Message-Passing in Haskell

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2011)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6539))

Included in the following conference series:

  • 646 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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. 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. Brown, N.C.C.: Conjoined Events. In: Advances in Message Passing. ACM, New York (2010)

    Google Scholar 

  4. Chaudhuri, A.: A concurrent ML library in concurrent Haskell. In: ICFP 2009, pp. 269–280. ACM, New York (2009)

    Google Scholar 

  5. Elliott, C.M.: Push-pull functional reactive programming. In: Haskell 2009, pp. 25–36. ACM, New York (2009)

    Google Scholar 

  6. Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall, Englewood Cliffs (1985)

    MATH  Google Scholar 

  7. Hughes, J.: Generalising monads to arrows. Sci. Comput. Program. 37(1-3), 67–111 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  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)

    Chapter  Google Scholar 

  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. McBride, C., Paterson, R.: Applicative programming with effects. J. Funct. Program. 18(1), 1–13 (2008)

    Article  MATH  Google Scholar 

  11. Nilsson, H., Courtney, A., Peterson, J.: Functional reactive programming, continued. In: Haskell 2002, pp. 51–64. ACM, New York (2002)

    Google Scholar 

  12. Peyton Jones, S.L., Wadler, P.: Imperative functional programming. In: POPL 1993, pp. 71–84. ACM, New York (1993)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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. Reppy, J.H.: Concurrent Programming in ML. Cambridge University Press, Cambridge (1999)

    Book  MATH  Google Scholar 

  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)

    Chapter  Google Scholar 

  17. Roscoe, A.W.: The Theory and Practice of Concurrency. Prentice-Hall, Englewood Cliffs (1997)

    Google Scholar 

  18. Russell, G.: Events in haskell, and how to implement them. In: ICFP 2001, pp. 157–168. ACM, New York (2001)

    Google Scholar 

  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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics