A Demo of Coco: A Compiler for Monadic Coercions in ML
Source: University of Maryland
Combining monadic computations may induce a significant syntactic overhead. To allow monadic programming in direct style, the authors have developed Coco, a type-based tool that automatically rewrites ML code inserting necessary binds, unit, and morphisms between monads. This tool demonstration will show how to take advantage of Coco to facilitate using monadic libraries in practice, and will discuss possible future development of Coco to fit the actual needs of programmers. Many functional programming computations may be expressed using monads. Examples include probabilistic computations, parsers, functional reactivity, and cooperative threads. ML provides some features that can be expressed monadically, like state and I/O, at no cost to the programmer, in a direct style.