LISP and Symbolic Computation

, Volume 7, Issue 1, pp 39–55 | Cite as

Monads and composable continuations

  • Philip Wadler

Abstract

Moggi's use of monads to factor semantics is used to model the composable continuations of Danvy and Filinski. This yields some insights into the type systems proposed by Murthy and by Danvy and Filinski. Interestingly, modelling some aspects of composable continuations requires a structure that is almost, but not quite, a monad.

Keywords

Monads Continuations Continuation-passing style Types 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Damas, L. and Milner, R. Principal type-schemes for functional programs. In9th Symposium on Principles of Programming Languages, Albuquerque, New Mexico, ACM (January 1982).Google Scholar
  2. 2.
    Danvy, O. and Filinski, A.A functional abstraction of typed contexts. Technical Report, Copenhagen University (August 1989).Google Scholar
  3. 3.
    Danvy, O. and Filinski, A. Abstracting control. InConference on Lisp and Functional Programming, Nice, France, ACM (June 1990).Google Scholar
  4. 4.
    Danvy, O. and Filinski, A. Representing control.Mathematical Structures in Computer Science, 2, 4 (December 1992).Google Scholar
  5. 5.
    Duba, B., Harper, R., and MacQueen, D. Typing first-class continuations in ml. In18'th Symposium on Principles of Programming Languages, Orlando, Florida, ACM (January 1991).Google Scholar
  6. 6.
    Felleisen, M. The theory and practice of first-class prompts. In15th Symposium on Principles of Programming Languages, San Diego, California, ACM (January 1988).Google Scholar
  7. 7.
    Hindley, R. The principle type-scheme of an object in combinatory logic.Trans. Am. Math. Soc., 146 (1969) 29–60.Google Scholar
  8. 8.
    Kieburtz, R., Agapiev, B., and Hook, J. Three monads for continuations. InACM SIGPLAN Workshop on Continuations (June 1992). Stanford University Report STAN-CS-92-1426.Google Scholar
  9. 9.
    Moggi, E. Computational lambda-calculus and monads. InSymposium on Logic in Computer Science, Asilomar, California, IEEE (June 1989). A longer version is available as a technical report from the University of Edinburgh.Google Scholar
  10. 10.
    Murthy, C. Control operators, hierarchies, and pseudo-classical type systems. InProceedings of the ACM SIGPLAN Workshop on Continuations (June 1992). Stanford University Report STAN-CS-92-1426.Google Scholar
  11. 11.
    Peyton Jones, S. and Wadler, P. Imperative functional programming. In20th Symposium on Principles of Programming Languages, Charleston, South Carolina, ACM (January 1993).Google Scholar
  12. 12.
    Plotkin, G. Call-by-name, call-by-value, and the λ-calculus.Theoretical Computer Science, 1 (1975) 125–159.Google Scholar
  13. 13.
    Rees, J. and Clinger, W. (eds). The revised3 report on the algorithmic language scheme.ACM SIGPLAN Notices, 21, (12) (1986) 37–79.Google Scholar
  14. 14.
    Reynolds, J. C. Definitional interpreters for higher-order programming languages. In25'th ACM National Conference (1972) 717–740.Google Scholar
  15. 15.
    Reynolds, J. C. Three approaches to type structure. InMathematical Foundations of Software Development, LNCS 185, Springer-Verlag (1985).Google Scholar
  16. 16.
    Wadler, P. Comprehending monads.Mathematical Structures in Computer Science, 2, 4 (December 1992). An earlier version appears inConference on Lisp and Functional Programming, Nice, France, ACM, June 1990.Google Scholar
  17. 17.
    Wadler, P. The essence of functional programming. In19th Symposium on Principles of Programming Languages, Albuquerque, New Mexico, ACM (January 1992).Google Scholar

Copyright information

© Kluwer Academic Publishers 1994

Authors and Affiliations

  • Philip Wadler
    • 1
  1. 1.Department of Computing ScienceUniversity of GlasgowGlasgowScotland

Personalised recommendations