The fact that Haskell is a pure language, that is, there are no unintended side effects, helps a lot in parallel and concurrent programming. The library and compiler both have a lot of options for optimizing and tuning the performance since it can (mostly!) correctly guess the intention of the program and how a program can be tuned to run concurrently.
Haskell gives a set of primitives for concurrent programming. These primitives enable programmers to build concurrency around them. These basic primitives are IORef, MVar, and STM. In this chapter, we will start with primitives, and then also work with strategies, and monad-par libraries which are built around these primitives to provide a higher-level abstraction for specifying concurrency within a program.
With the Cloud Haskell library, we move into the distributed world. In Cloud Haskell, we create logical nodes...