Abstract
Haskell provides a rich set of abstractions for parallel and concurrent programming. This tutorial covers the basic concepts involved in writing parallel and concurrent programs in Haskell, and takes a deliberately practical approach: most of the examples are real Haskell programs that you can compile, run, measure, modify and experiment with. We cover parallel programming with the @Eval@ monad, Evaluation Strategies, and the @Par@ monad. On the concurrent side, we cover threads, @MVar@s, asynchronous exceptions, Software Transactional Memory, the Foreign Function Interface, and briefly look at the construction of high-speed network servers in Haskell.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Harris, T., Singh, S.: Feedback directed implicit parallelism. In: Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, ICFP 2007, pp. 251–264 (2007)
Harris, T., Marlow, S., Peyton-Jones, S., Herlihy, M.: Composable memory transactions. In: Proceedings of the Tenth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2005, pp. 48–60 (2005)
Marlow, S., Peyton Jones, S.L., Moran, A., Reppy, J.: Asynchronous exceptions in Haskell. In: ACM Conference on Programming Languages Design and Implementation (PLDI 2001), Snowbird, Utah, pp. 274–285. ACM Press (June 2001)
Marlow, S.: An extensible dynamically-typed hierarchy of exceptions. In: Proceedings of the 2006 ACM SIGPLAN Workshop on Haskell, Haskell 2006, pp. 96–106 (2006)
Marlow, S., Newton, R., Peyton Jones, S.: A monad for deterministic parallelism. under submission, http://community.haskell.org/~simonmar/bib/monad-par-2011_abstract.html
Marlow, S., Peyton Jones, S., Thaller, W.: Extending the Haskell foreign function interface with concurrency. In: Proceedings of the 2004 ACM SIGPLAN Workshop on Haskell, Haskell 2004, pp. 22–32 (2004)
Marlow, S., Peyton Jones, S., Singh, S.: Runtime support for multicore haskell. In: ICFP 2009: Proceeding of the 14th ACM SIGPLAN International Conference on Functional Programming, Edinburgh, Scotland (August 2009)
Marlow, S., Maier, P., Loidl, H.-W., Aswad, M.K., Trinder, P.: Seq no more: Better strategies for parallel haskell. In: Haskell 2010: Proceedings of the Third ACM SIGPLAN Symposium on Haskell (2010), http://community.haskell.org/~simonmar/papers/strategies.pdf
Marlow, S. (ed.): The Haskell 2010 report (2010), http://www.haskell.org/onlinereport/haskell2010/
O’Sullivan, B., Tibell, J.: Scalable I/O event handling for GHC. In: Proceedings of the Third ACM Haskell Symposium on Haskell, Haskell 2010, pp. 103–108 (2010)
Peyton Jones, S., Gordon, A., Finne, S.: Concurrent Haskell. In: Proc. of POPL 1996, pp. 295–308. ACM Press (1996)
Peyton Jones, S.: Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in haskell. Engineering Theories of Software Construction (2002)
Peyton Jones, S., Singh, S.: A Tutorial on Parallel and Concurrent Programming in Haskell. In: Koopman, P., Plasmeijer, R., Swierstra, D. (eds.) AFP 2008. LNCS, vol. 5832, pp. 267–305. Springer, Heidelberg (2009)
Trinder, P.W., Hammond, K., Loidl, H.-W., Peyton Jones, S.: Algorithm + Strategy = Parallelism 8(1), 23–60 (1998)
Wilson, G. (ed.): Beautiful code. O’Reilly (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Marlow, S. (2012). Parallel and Concurrent Programming in Haskell. In: Zsók, V., Horváth, Z., Plasmeijer, R. (eds) Central European Functional Programming School. CEFP 2011. Lecture Notes in Computer Science, vol 7241. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32096-5_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-32096-5_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-32095-8
Online ISBN: 978-3-642-32096-5
eBook Packages: Computer ScienceComputer Science (R0)