ACM Home Page
Please provide us with feedback. Feedback
Pretty printing with lazy dequeues
Full text PdfPdf (209 KB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 27 ,  Issue 1  (January 2005) table of contents
Pages: 163 - 184  
Year of Publication: 2005
ISSN:0164-0925
Author
Olaf Chitil  University of Kent, United Kingdom
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 8,   Downloads (12 Months): 52,   Citation Count: 3
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/1053468.1053473
What is a DOI?

ABSTRACT

There are several purely functional libraries for converting tree structured data into indented text, but they all make use of some backtracking. Over twenty years ago, Oppen published a more efficient imperative implementation of a pretty printer. This article shows that the same efficiency is also obtainable without destructive updates by developing a similar but purely functional Haskell implementation with the same complexity bounds. At its heart lie two lazy double ended queues.


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
Azero, P. and Swierstra, D. 1998. Optimal pretty-printing combinators. http://www.cs.uu.nl/groups/ST/Center/SoftwareDistributions.
 
2
Bird, R. S. 1984. Using circular programs to eliminate multiple traversals of data. Acta Inf. 21, 239--250.
 
3
 
4
 
5
6
7
 
8
Peyton Jones, S. L. 1997. A pretty printer library in Haskell. Part of the GHC distribution at http://www.haskell.org/ghc.
 
9
Peyton Jones, S. L., Ed. 2003. Haskell 98 Language and Libraries, The Revised Report. Cambridge University Press.
 
10
Wadler, P. 2003. A prettier printer. In The Fun of Programming. Palgrave Macmillan, Chapter 11, 223--244.