Effectively tackling the awkward squad

Stephen Dolan, Spiros Eliopoulos, Daniel Hillerstrom, Anil Madhavapeddy, KC Sivaramakrishnan, and Leo White. In the ACM ML Workshop. .Stephen DolanSpiros EliopoulosDaniel HillerstromAnil MadhavapeddyKC SivaramakrishnanLeo White

Effectively tackling the awkward squad

Abstract

Useful real-world functional programs must often confront the Awkward Squad, a range of un-beautiful issues concerning the interplay between concurrency, input/output, exceptions, resources, etc. We show that algebraic effects and their handlers can elegantly express such programs without compromising performance. In particular, we introduce asynchronous effects and their handlers, and show how they elegantly solve the interaction between user-level threads and operating system services.