ACM Home Page
Please provide us with feedback. Feedback
Monad transformers and modular interpreters
Full text pdf formatPdf (1.10 MB)
Source Annual Symposium on Principles of Programming Languages archive
Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
San Francisco, California, United States
Pages: 333 - 343  
Year of Publication: 1995
ISBN:0-89791-692-1
Authors
Sheng Liang  Yale University, Department of Computer Science, New Haven, CT
Paul Hudak  Yale University, Department of Computer Science, New Haven, CT
Mark Jones  Department of Computer science, University of Nottingham, University Park, Nottingham NG7 2RD, England and Yale University, Department of Computer Science, New Haven, CT
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 10,   Downloads (12 Months): 70,   Citation Count: 48
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues   peer to peer  

Tools and Actions: Review this Article  
Save this Article to a Binder    Display Formats: BibTex  EndNote ACM Ref   
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/199448.199528
What is a DOI?

ABSTRACT

We show how a set of building blocks can be used to construct programming language interpreters, and present implementations of such building blocks capable of supporting many commonly known features, including simple expressions, three different function call mechanisms (call-by-name, call-by-value and lazy evaluation), references and assignment, nondeterminism, first-class continuations, and program tracing.The underlying mechanism of our system is monad transformers, a simple form of abstraction for introducing a wide range of computational behaviors, such as state, I/O, continuations, and exceptions.Our work is significant in the following respects. First, we have succeeded in designing a fully modular interpreter based on monad transformers that incudes features missing from Steele's, Espinosa's, and Wadler's earlier efforts. Second, we have found new ways to lift monad operations through monad transformers, in particular difficult cases not achieved in Moggi's original work. Third, we have demonstrated that interactions between features are reflected in liftings and that semantics can be changed by reordering monad transformers. Finally, we have implemented our interpreter in Gofer, whose constructor classes provide just the added power over Haskell's type classes to allow precise and convenient expression of our ideas. This implementation includes a method for constructing extensible unions and a form of subtyping that is interesting in its own right.


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
 
2
Adrienne Bloss, Paul HudaK and Jonathan Young. Code optimization for lazy evaluation. Lisp and Symbolic Computation, 1(1):147-164,1988.
 
3
 
4
David Espinosa. Modular denotational semantics. Unpublished manuscript, December 1993.
 
5
David Espinosa. Building interpreters by transforming stratified monads. Unpublished manuscript, ftp from altdorf.ai.mit.edu:pub/dae, June 1994.
6
7
 
8
Mark P. Jones. Introduction to gofer 2.20. Ftp from nebula.cs.yale.e#lu in the directory pub/haskell/gofer, September 19911.
9
 
10
Mark P. Jones #nd Luc Duponcheel Composing monads. Research Report- YALEU/DCS/RR-1004, Yale University Departrhent of Computer Science, New Haven, Connecticut, December 1993.
11
12
 
13
 
14
 
15
Eugenio Mogg#. An abstract view of programming languages. Techni/:al Report ECS-LFCS-90-113, Laboratory for Foundations of Computer Science, University of Edinburgh, Edinburgh, Scotland, 1990.
 
16
17
18
 
19
20
21
22
23

CITED BY  48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Collaborative Colleagues:
Sheng Liang: colleagues
Paul Hudak: colleagues
Mark Jones: colleagues

Peer to Peer - Readers of this Article have also read: