English

CloudMicroHaskell: Direct-Style Distributed Haskell via Runtime Graph Serialisation

Distributed, Parallel, and Cluster Computing 2026-07-11 v1

Abstract

Cloud Haskell brings Erlang-style distributed programming to Haskell, but its treatment of mobile code exposes a difficult boundary in the source-level API. Remote processes must be expressed as static closures, messages must satisfy serialisation constraints, and participating nodes are assumed to share the relevant code. This paper explores a different design point. We present CloudMicroHaskell, a Cloud Haskell-style library built on MicroHaskell, whose runtime represents both code and data as a combinator graph. When a process or message crosses a node boundary, CloudMicroHaskell serialises the reachable graph directly. As a result, remote spawning can be written in direct style: process bodies may capture variables from their surrounding scope, and messages may contain ordinary values, including functions, without programmer-written closure conversion. We describe the implementation of the CloudMicroHaskell node runtime, including remote spawn, message delivery, monitors, exit propagation, and library implementations of generic servers and supervisors. We evaluate the system with process/message benchmarks, a distributed work-pool benchmark, a file-synchronisation case study, and a heterogeneous deployment on microcontrollers. The results show that runtime graph serialisation makes the \ch{} programming model substantially more direct, while also making the tradeoff explicit: some guarantees enforced by \ch{}'s source-level types become dynamic checks, and programmers must be aware of laziness and runtime-owned resources when moving graphs between nodes.

Cite

@article{arxiv.2607.10443,
  title  = {CloudMicroHaskell: Direct-Style Distributed Haskell via Runtime Graph Serialisation},
  author = {Robert Krook and Lennart Augustsson},
  journal= {arXiv preprint arXiv:2607.10443},
  year   = {2026}
}