## Combining Monads (1992)

### Cached

### Download Links

- [isabase.philol.msu.ru]
- [www-sop.inria.fr]
- [www.swiss.ai.mit.edu:8000]
- [ftp.dcs.glasgow.ac.uk]
- [pag.lcs.mit.edu]
- [pag.csail.mit.edu]
- DBLP

### Other Repositories/Bibliography

Venue: | Mathematical Structures in Computer Science |

Citations: | 458 - 13 self |

### BibTeX

@INPROCEEDINGS{King92combiningmonads,

author = {David King and Philip Wadler},

title = {Combining Monads},

booktitle = {Mathematical Structures in Computer Science},

year = {1992},

pages = {61--78}

}

### Years of Citing Articles

### OpenURL

### Abstract

Monads provide a way of structuring functional programs. Most real applications require a combination of primitive monads. Here we describe how some monads may be combined with others to yield a combined monad.

### Citations

1562 | The Definition of Standard ML - Miller, Tofte, et al. - 1990 |

1309 | Monads for Functional Programming - Wadler - 1995 |

921 | Categories for the working mathematician - Lane - 1998 |

536 |
The Implementation of Functional Programming Languages
- Jones
- 1987
(Show Context)
Citation Context ...is assumed. The paper contains two significant new contributions. The first contribution is a new language feature, the monad comprehension. This generalises the familiar notion of list comprehension =-=[Wad87]-=-, due originally to Burstall and Darlington, and found in KRC [Tur82], Miranda, Haskell and other languages. Monad comprehensions are not essential to the structuring technique described here, but the... |

440 | Computational lambda-calculus and monads
- Moggi
- 1989
(Show Context)
Citation Context ...such structure only when it is needed. It is needed here, as evidenced by Moggi's requirement that a computational monad have a strength, a function t :: (x ; M y) ! M (x ; y) satisfying certain laws =-=[Mog89a]-=-. In a cartesian closed category, a monad with a strength is equivalent to a monad with a strong functor as described above. In our framework, the strength is defined by t (x ; y) = [ (x ; y) j y / y ... |

424 | Introduction to Higher Order Categorical Logic - Lambek, Scott - 1986 |

394 | Category Theory for Computing Science - Barr, Wells - 1999 |

364 |
Types, abstraction and parametric polymorphism
- Reynolds
- 1983
(Show Context)
Citation Context ...rphic types of unit and join. The idea of deriving laws from types goes by the slogan "theorems for free" [Wad89] and is a consequence of Reynolds' abstraction theorem for polymorphic lambda=-= calculus [Rey83]-=-. In categorical terms, unit and join are natural transformations. Rather than treat unit as a single function with a polymorphic type, categorists treat it as a family of arrows, unit x :: x !M x , o... |

329 | Theorems for free
- Wadler
- 1989
(Show Context)
Citation Context ...map (map f ): Laws (iii ) and (iv) may be derived by a systematic transformation of the polymorphic types of unit and join. The idea of deriving laws from types goes by the slogan "theorems for f=-=ree" [Wad89]-=- and is a consequence of Reynolds' abstraction theorem for polymorphic lambda calculus [Rey83]. In categorical terms, unit and join are natural transformations. Rather than treat unit as a single func... |

285 | Why Functional Programming Matters - Hughes - 1990 |

220 | Call-by-name, call-by-value, and the #-calculus - Plotkin - 1975 |

215 | An introduction to the theory of lists - Bird - 1987 |

199 | Call-by-name, call-by-value and the λ-calculus - Plotkin - 1975 |

143 |
Miranda: a non-strict functional language with polymorphic types
- Turner
- 1985
(Show Context)
Citation Context ...and Scheme [RC86] support a wide variety of features, such as assigning to state, handling exceptions, and invoking continuations. Pure, lazy functional languages such as Haskell [HPW91] or Miranda 1 =-=[Tur85]-=- eschew such features, because they are incompatible with the advantages of lazy evaluation and equational reasoning, advantages that have been described at length elsewhere [Hug89, BW88]. Purity has ... |

134 | types can change the world!, in
- Wadler, Linear
- 1990
(Show Context)
Citation Context ...ers in an SR-comprehension is irrelevant, and so it is perfectly permissible to evaluate e 1 and e 2 in any order, or even concurrently. The interpreter derived here is similar in structure to one in =-=[Wad90], which us-=-es a type system based on linear logic to guarantee safe destructive update of arrays. (Related type systems are discussed in [GH90, Wad91].) However, the linear type system uses a "let!" co... |

111 | Continuation-passing, closure-passing style - Appel, Jim - 1989 |

96 | Algorithmics: Towards programming as a mathematical activity - Meertens - 1986 |

88 | Is there a use for linear logic - Wadler - 1991 |

86 |
How to replace failure by a list of successes
- Wadler
- 1985
(Show Context)
Citation Context ...r operators appear in other languages. As an example of its use, the term the ([ x \Gamma 1 j xs1 ] Maybe ? [ 0 ] Maybe ) 22 returns the predecessor of x if it is non-negative, and zero otherwise. In =-=[Wad85]-=- it was proposed to use lists to represent exceptions, encoding a value x by the unit list, and an exception by the empty list. This corresponds to the mapping list :: Maybe x ! List x list (Just x ) ... |

85 |
Integrating functional and imperative programming
- Gifford, Lucassen
- 1986
(Show Context)
Citation Context .... A key feature of the monad approach is the use of types to indicate what parts of a program may have what sorts of effects. In this, it is similar in spirit to Gifford and Lucassen's effect systems =-=[GL88]-=-. The examples in this paper are based on Haskell [HPW91], though any lazy functional language incorporating the Hindley/Milner type system would work as well. The remainder of this paper is organised... |

71 | Single-threaded polymorphic lambda calculus - Guzman, Hudak - 1990 |

63 |
editors. Report on the Programming Language Haskell 98. A non-strict Purely Functional Language
- Jones, Hughes
- 1999
(Show Context)
Citation Context ...rd ML [Mil84, HMT88] and Scheme [RC86] support a wide variety of features, such as assigning to state, handling exceptions, and invoking continuations. Pure, lazy functional languages such as Haskell =-=[HPW91]-=- or Miranda 1 [Tur85] eschew such features, because they are incompatible with the advantages of lazy evaluation and equational reasoning, advantages that have been described at length elsewhere [Hug8... |

56 |
Detecting global variables in denotational specifications. ACM transactions on programming languages and systems
- Schmidt
- 1985
(Show Context)
Citation Context ... this solution has never been proposed before, and its discovery comes as a surprise considering the plethora of more elaborate solutions that have been proposed: these include syntactic restrictions =-=[Sch85]-=-, run-time checks [Hol83], abstract interpretation [Hud86a, Hud86b, Blo89], and exotic type systems [GH90, Wad90, Wad91]. That monads led to the discovery of this solution must count as a point in the... |

46 | On the relation between direct and continuation semantics - Reynolds - 1974 |

41 |
A functional theory of exceptions
- Spivey
- 1990
(Show Context)
Citation Context ...some previous proposals for incorporating various features into functional languages: exceptions [Wad85, Spi90], parsers [Wad85, Fai87, FL89], and non-determinism [HO89]. In particular, Spivey's work =-=[Spi90]-=- is notable for pointing out, independently of Moggi, that monads provide a frame2 work for exception handling. There is a translation scheme from -calculus into an arbitrary monad. Indeed, there are ... |

35 |
Recursion Equations as a Programming Language
- Turner
- 1982
(Show Context)
Citation Context ... first contribution is a new language feature, the monad comprehension. This generalises the familiar notion of list comprehension [Wad87], due originally to Burstall and Darlington, and found in KRC =-=[Tur82]-=-, Miranda, Haskell and other languages. Monad comprehensions are not essential to the structuring technique described here, but they do provide a pleasant syntax for expressing programs structured in ... |

34 | The definition of Standard ML (version 2 - Harper, Milner, et al. - 1988 |

31 | Update analysis and the efficient implementation of functional aggregates - Bloss - 1989 |

31 |
Expressing and reasoning about non-deterministic functional programs
- Hughes, O'Donnel
- 1989
(Show Context)
Citation Context ...rehensions help to clarify and unify some previous proposals for incorporating various features into functional languages: exceptions [Wad85, Spi90], parsers [Wad85, Fai87, FL89], and non-determinism =-=[HO89]-=-. In particular, Spivey's work [Spi90] is notable for pointing out, independently of Moggi, that monads provide a frame2 work for exception handling. There is a translation scheme from -calculus into ... |

26 | A semantic model of reference counting and its abstraction (detailed summary - Hudak - 1986 |

25 | Constructing natural language interpreters in a lazy functional language - Frost, Launchbury - 1989 |

17 | A categorical approach to the theory of lists - Spivey - 1989 |

8 | Higher order functions considered unnecessary for higher order programming
- Goguen
- 1988
(Show Context)
Citation Context ...ture of the solution means that it cannot be applied in first-order languages such as Prolog or OBJ. It also casts doubt on Goguen's thesis that first-order languages are sufficient for most purposes =-=[Gog88]-=-. Monads and monad comprehensions help to clarify and unify some previous proposals for incorporating various features into functional languages: exceptions [Wad85, Spi90], parsers [Wad85, Fai87, FL89... |

5 | non-determinism, side-effects, and parallelism: A functional perspective - Arrays - 1986 |

5 | Report on the functional programming language - Hudak, Wadler - 1988 |

3 | Form follows function - Fairbairn - 1987 |

3 |
A simple and efficient way to handle large data structures in applicative languges
- Holmstrom
- 1983
(Show Context)
Citation Context ...been proposed before, and its discovery comes as a surprise considering the plethora of more elaborate solutions that have been proposed: these include syntactic restrictions [Sch85], run-time checks =-=[Hol83]-=-, abstract interpretation [Hud86a, Hud86b, Blo89], and exotic type systems [GH90, Wad90, Wad91]. That monads led to the discovery of this solution must count as a point in their favour. Why has this s... |

3 | An abstract view of programming languges. Course notes - Moggi |

2 |
Axiomatising operational equivalence in the presence of side effects
- Mason, Talcott
- 1989
(Show Context)
Citation Context ...ctly the order in which the assignments take effect, regardless of the order of evaluation used. Reasoning about programs in impure functional languages is problematic (although not impossible -- see =-=[MT89]-=- for one approach). In contrast, programs written using monads, like all pure programs, can be reasoned about in the usual way, substituting equals for equals. They also satisfy additional laws, such ... |