## Structuring Functional Programs By Using Monads (1998)

Citations: | 1 - 0 self |

### BibTeX

@MISC{Obradovic98structuringfunctional,

author = {Davor Obradovic},

title = {Structuring Functional Programs By Using Monads},

year = {1998}

}

### OpenURL

### Abstract

The notion of monads originates from the category theory. It became popular in the programming languages community after Moggi proposed a way to use monads to structure denotational semantics. Wadler and others showed how this can be effectively used as a methodology for building interpreters. Monads are capable of capturing individual language features in a modular way. This paper evaluates two modular approaches for building monadic interpreters - Steele's pseudomonads and Liang, Hudak & Jones's monad transformers. We also consider the the problem of feature interaction in the monad transformers setting. 1 Monads: Introduction and Motivation Is there a practical use for category theory? Certainly - the programming language theory is a good example. Many categorical concepts led to important discoveries about programming languages and vice-versa, many ideas from the category theory were motivated by the programming languages research. Monads probably fit in both groups. Category t...

### Citations

1344 | Introduction to Functional Programming
- Bird, Wadler
(Show Context)
Citation Context ...tional values). Now, for instance, we can easily localize the parts of a program that have side-effects from those that don't. Usage of different stateful monads in Haskell is more closely studied in =-=[2]-=- and [4]. ffl The problem of interaction between multiple monadic features in a single interpreter is not addressed - how does one gradually build a monad that captures multiple features? ffl Finally,... |

467 | Comprehending Monads
- Wadler
- 1990
(Show Context)
Citation Context ... of universal algebra. Two decades later people started studying programming language aspects of monads. Among the biggest contributors to this promising idea were Eugenio Moggi [6] and Philip Wadler =-=[7]-=-. The original idea was to use monads for presenting the denotational semantics of complex languages. Monads seemed to be able to capture a variety of commonly found language properties. At the same t... |

181 | A system of constructor classes: overloading and implicit higher-order polymorphism
- Jones
- 1993
(Show Context)
Citation Context ...weapon - monad transformers. Monad transformers generalize pseudomonads and give a generally simple mechanism for building monads through multiple layers. Gofer's type system with constructor classes =-=[1]-=- proved to be very useful for this purpose. This approach, however, faced the problem of lifting 19 of monadic operations to the top level. Only the correctness criteria for natural lifting is given, ... |

171 |
An Abstract View of Programming Languages
- Moggi
- 1990
(Show Context)
Citation Context ...ess certain properties of universal algebra. Two decades later people started studying programming language aspects of monads. Among the biggest contributors to this promising idea were Eugenio Moggi =-=[6]-=- and Philip Wadler [7]. The original idea was to use monads for presenting the denotational semantics of complex languages. Monads seemed to be able to capture a variety of commonly found language pro... |

37 | Monads and composable continuations
- Wadler
- 1994
(Show Context)
Citation Context ...of stateful computations in Haskell. One may be wondering if there are any computational aspects at all that can not be modeled by monads?. Seems like the answer is (surprisingly?) yes! Philip Wadler =-=[9]-=- found that types of the certain kinds of continuations are too general to be interpreted in a monad. This looks like a good area for further research - perhaps we need some kind of generalized monads... |

20 |
Building interpreters by composing monads
- Jr
- 1994
(Show Context)
Citation Context ...d Wadler's work! But some things were not good enough. First, Steele wanted to be able to incrementally add new features to the existing interpreter by precisely specifying how they work together. In =-=[3]-=- he showed how to construct monadic building blocks that one can stack together 6 (almost like Legos) to obtain monads. In the previous chapter we saw that Wadler's interpreter, although flexible, usu... |

1 |
Monad transformenrs and modular interpreters
- Liang, Hudak, et al.
- 1995
(Show Context)
Citation Context ...ously described enhancements. For example, nondeterministic version of the call-by-name interpreter would evaluate the old example test (App (Lam "x" (Add (Var"x")(Var"x"=-=))) (Amb (Con 2)(Con 3))) to "[4,5,5,6]", rahter -=-than "[4,6]" what we had before. 2.6 Overview Following the same general idea, we can easily extend our interpreter to deal with continuations, references, call-by-need evaluation and beyond... |