Generalising monads

  • John Hughes
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1422)


Phil Wadler's idea of using monads to structure purely functional programs has had a profound effect on the way libraries of combinators are designed in Haskell. By basing the signature of such a library on a monad, the designer gains access to a wide variety of possible implementations, and moreover enables the library to be used in conjunction with generic monadic code.

However, recently some combinator libraries have been designed that are inherently incompatible with the monad signature. Swierstra's library for LL-1 parsing is an interesting example. In this talk we propose another generic library signature, inspired by Kleisli categories, which is more general than the monad signature and can be used in the design of libraries such as Swierstra's that collect static information about computations.

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • John Hughes
    • 1
  1. 1.Chalmers University of Technology and University of GöteborgGöteborgSweden

Personalised recommendations