Abstract

We present Cloud Haskell, a domain-specific language for developing programs for a distributed-memory computing environment. Implemented as a shallow embedding in Haskell, it provides a message-passing communication model, inspired by Erlang, without introducing incompatibility with Haskell’s established shared-memory concurrency. A key contribution is a method for serializing function closures for transmission across the network. Cloud Haskell has been implemented; we present example code and some preliminary performance measurements.

Errata

Just before 4.1, the code for ping2 should read like this

data Ping2 = Ping2 (SendPort Pong2)   -- Sent by ping-process
                                      -- received by pong-process
data Pong2 = Pong2 (SendPort Ping2)   -- Sent by pong-process
                                      -- received by ping-process

ping2 :: SendPort Pong2 -> ReceivePort Pong2 -> ProcessM ()
ping2 pongout pongin = do { Pong2 ping_port <- receiveChan pongin
                          ; sendChan ping_port (Ping2 pongout)
                          ; ping2 pongout pongin }
..similarly pong2…