Promotional transformation of monadic programs

Zhenjiang Hu,Hideya Iwasaki,Masato Takeichi
1995-01-01
Abstract:Monads are becoming an increasingly important tool for structural functional programming, because they provide a uniform framework for describing a wide range of programming language features. To facilitate program transformation, Fokkinga derived a sufficient assumption under which there is a kind of so-called monadic catamorphisms which satisfy several general laws useful for the transformation of monadic programs. However, his theory is too restrictive to be applied. In this paper, we propose a new theory on monadic catamorphism by moving Fokkinga's assumption on the monad to the condition on a map between monadic algebras so that our theory is valid for arbitrary monads including, for example, the state monad that is not allowed in Fokkinga's theory. Our theory covers Fokkinga's as a special case but can be applied to a wider class of monadic programs. Many examples will be used to illustrate our …
What problem does this paper attempt to address?