ACM Home Page
Please provide us with feedback. Feedback
Representing monads
Full text PdfPdf (1.19 MB)
Source Annual Symposium on Principles of Programming Languages archive
Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
Portland, Oregon, United States
Pages: 446 - 457  
Year of Publication: 1994
ISBN:0-89791-636-0
Author
Andrzej Filinski  School of Computer Science, Carnegie Mellon University, Pittsburgh, PA
Sponsors
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 9,   Downloads (12 Months): 62,   Citation Count: 38
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/174675.178047
What is a DOI?

ABSTRACT

We show that any monad whose unit and extension operations are expressible as purely functional terms can be embedded in a call-by-value language with “composable continuations”. As part of the development, we extend Meyer and Wand's characterization of the relationship between continuation-passing and direct style to one for continuation-passing vs. general “monadic” style. We further show that the composable-continuations construct can itself be represented using ordinary, non-composable first-class continuations and a single piece of state. Thus, in the presence of two specific computational effects - storage and escapes - any expressible monadic structure (e.g., nondeterminism as represented by the list monad) can be added as a purely definitional extension, without requiring a reinterpretation of the whole language. The paper includes an implementation of the construction (in Standard ML with some New Jersey extensions) and several examples.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Andrew W. Appel and David B. MacQueen. Standard ML of New Jersey. in Third international Symposium on Programming Language implementation and Logic Programming, number 528 in Lecture Notes in Computer Science, pages 1-13, Passau, Germany, August 1991.
2
3
 
4
Olivier Danvy and Andrzej Filinski. Representing control: A study of the CPS transformation. Mathematical Structures in Computer Science, 2(4):361- 391, December 1992.
5
6
 
7
8
9
10
 
11
 
12
Julia L. Lawall and Olivier Danvy. Continuationbased partial evaluation. Indiana University and Aarhus University. Personal communication, October 1993.
 
13
 
14
 
15
Eugenio Moggi. An abstract view of programming languages. Technical Report ECS-LFCS-90- 113, Laboratory for Foundations of Computer Science, University of Edinburgh, Edinburgh, Scotland, April 1990.
 
16
 
17
Chetan R. Murthy. Control operators, hierarchies, and pseudo-classical type systems" A-translation at work. In Proceedings of the A CM SIGPLAN Workshop on Continuations, pages 49-71, San Francisco, California, June 1992. (Technical Report No. STAN-CS-92-1426, Department of Computer Science, Stanford University).
18
 
19
Gordon D. Plotkin. Call-by-name, call-by-value and the ,~-calculus. Theoretical Computer Science, 1(2):125-159, December 1975.
20
21
 
22
23
24
25
 
26
27
 
28
Brian C. Smith. Reflection and Semantics in a Procedural Language. PhD thesis, Massachusetts Institute of Technology, Cambridge, Massachusetts, January 1982. MIT-LCS-TR-272.
29
 
30
Joseph E. Stoy. The congruence of two programming language definitions. Theoretical Computer Science, 13(2):151-174, February 1981.
31
32
 
33
 
34
Mitchell Wand and Daniel P. Friedman. The mystery of the tower revealed: A non-reflective description of the reflective tower. Lisp and Symbolic Computation, 1(1), May 1988.

CITED BY  39