## Monatron: an extensible monad transformer library. Available at http://www.cs.nott.ac.uk/~mjj/pubs/monatron.pdf

Citations: | 12 - 2 self |

### BibTeX

@MISC{Jaskelioff_monatron:an,

author = {Mauro Jaskelioff},

title = {Monatron: an extensible monad transformer library. Available at http://www.cs.nott.ac.uk/~mjj/pubs/monatron.pdf},

year = {}

}

### OpenURL

### Abstract

Abstract. Monads are pervasive in functional programming. In order to reap the benefits of their abstraction power, combinator libraries for monads are necessary. Monad transformers provide the basis for such libraries, and are based on a design that has proved to be successful. In this article, we show that this design has a number of shortcomings and provide a new design that builds on the strengths of the traditional design, but addresses its problems. 1

### Citations

1353 | Introduction to Functional Programming
- Bird, Wadler
- 1988
(Show Context)
Citation Context ...fects such as state, exceptions and continuations. These effects are usually associated with imperative languages but, with the help of monads, they can be elegantly modelled in a functional language =-=[11]-=-. However, obtaining a monad which models several combined effects can be difficult. Moreover, since monads must satisfy certain coherence conditions, the programmer is faced with the task of verifyin... |

766 | Notions of computation and monads - Moggi - 1991 |

248 | Monad transformers and modular interpreters
- Liang, Hudak, et al.
- 1995
(Show Context)
Citation Context ... and to think in terms of high-level idioms. Finally, a library should strive to be efficient and portable. Combinator libraries for monads are built from modular components called monad transformers =-=[14]-=-. Current monad transformer libraries, such as mtl [4],data Either x a = Left x | Right a instance Monad (Either x) where return a = Right a Left x >= f = Left x Right a >= f = f a newtype Id a = Id ... |

87 | The Design of a Pretty-printing Library
- Hughes
- 1995
(Show Context)
Citation Context ...on the strengths of the traditional design, but addresses its problems. 1 Introduction The power of functional languages lies, to a great extent, in their ability to name and reuse programming idioms =-=[6]-=-. This power is often realised in the form of combinator libraries, which consist of a collection of idioms commonly found in the library’s application area. Programmers can reuse these idioms and com... |

62 | Monadic parsing in haskell
- Hutton, Meijer
- 1998
(Show Context)
Citation Context ... in Figure 3). 6 Conclusion Combinator libraries for monads are essential for facilitating the construction of complex monads that naturally appear in applications that go from basic parser libraries =-=[7]-=- to end-user applications [16]. We have shown that the current design of monad transformer libraries has a number of shortcomings that hinder the extensibility, predictability, portability, and expres... |

54 | The Mozart Effect
- Hughes
- 2001
(Show Context)
Citation Context ...er e monad for modelling environments of type e, and an Exception x monad for modelling exceptions of type x. To see the details of their implementation we refer the reader to an introductory article =-=[1]-=-. These monads provide some of the most common computational effects but, by all means, they are not the only ones. The fact that monad libraries (mostly) only support this limited set of effects and ... |

50 | First-class polymorphism with type inference
- Jones
- 1997
(Show Context)
Citation Context ...one implementation of an operation for a given monad. Portability: A fully-functional implementation only requires to extend Haskell with rank-2 types, a fairly standard and well-understood extension =-=[10]-=-. However, if one wants operation overloading then all the extensions that were required in the traditional design will be necessary (see Section 4.1). The main difference between the traditional appr... |

43 |
Categories for the Working Mathematician. Number 5
- Lane
- 1997
(Show Context)
Citation Context ...ult). However, it can be shown that every operation op :: ∀a. S (M a) → M a is in one-to-one correspondence with an operation op :: ∀a. S a → Cod M a. Here, Cod M a is the codensity monad transformer =-=[13, 9]-=- defined in Fig. 2. Categorically, the codensity monad transformer takes a functor to the right Kan extension of the functor along itself. The correspondence between op and op shows how an operation w... |

29 | Deriving backtracking monad transformers
- Hinze
- 2001
(Show Context)
Citation Context ...the authors of these two libraries. The codensity monad transformer has appeared in a number of functional programming papers. For example, it has been derived as a monad transformer for backtracking =-=[5]-=-, it has been calculated in a search for efficient parsers [2], and it has been used to optimize substitution in the free monad [17]. In our case, however, we were motivated by its mathematical proper... |

9 | Modular monad transformers
- Jaskelioff
- 2009
(Show Context)
Citation Context ...resses the issues discussed above (Section 4). Its implementation (Section 5) builds on the strengths of existing monad transformer libraries and incorporates some new ideas on liftings of operations =-=[9]-=- that are based on solid theoretical principles. This design has been implemented in the Monatron [8] library. The organization of the paper is as follows: in Section 2 we explain how to construct com... |

8 | Parallel parsing processes
- Claessen
(Show Context)
Citation Context ...ormer has appeared in a number of functional programming papers. For example, it has been derived as a monad transformer for backtracking [5], it has been calculated in a search for efficient parsers =-=[2]-=-, and it has been used to optimize substitution in the free monad [17]. In our case, however, we were motivated by its mathematical properties [9]. Acknowledgements. I would like to thank Graham Hutto... |

8 | Asymptotic improvement of computations over free monads
- Voigtländer
- 2008
(Show Context)
Citation Context ...example, it has been derived as a monad transformer for backtracking [5], it has been calculated in a search for efficient parsers [2], and it has been used to optimize substitution in the free monad =-=[17]-=-. In our case, however, we were motivated by its mathematical properties [9]. Acknowledgements. I would like to thank Graham Hutton and the anonymous referees for their comments and suggestions and al... |

1 |
Monad transformer library. http://hackage.haskell.org/cgi-bin/ hackage-scripts/package/mtl-1.1.0.2
- Gill
(Show Context)
Citation Context ... library should strive to be efficient and portable. Combinator libraries for monads are built from modular components called monad transformers [14]. Current monad transformer libraries, such as mtl =-=[4]-=-,data Either x a = Left x | Right a instance Monad (Either x) where return a = Right a Left x >= f = Left x Right a >= f = f a newtype Id a = Id a instance Monad Id where return a = Id a (Id a) >= f ... |