Download PDF

Symposium on Implementation and Application of Functional Languages, Date: 2012/08/30 - 2012/09/01, Location: Oxford, UK

Publication date: 2012-01-01

Pre-Proceedings of the 24th Symposium on Implementation and Application of Functional Languages

Author:

Keuchel, Steven
Schrijvers, Tom

Keywords:

monads, reasoning, parametricity

Abstract:

Higher-order functions that are polymorphic in a monad make highly flexible modular components. Unfortunately, the combination of an unknown function parameter and a polymorphic monad are detrimental to reasoning. This paper shows how to eliminate both the function parameter and the polymorphism. The resulting characterization is amenable to reasoning. The approach is based on a judicious combination of the coroutine monad transformer and monad morphisms.