Chitil, Olaf (2006) Pretty Printing with Delimited Continuations. Technical report. University of Kent, Kent, UK (KAR id:14464)
|
PDF
Language: English |
|
|
Download this file (PDF/147kB) |
Preview |
| Request a format suitable for use with assistive technology e.g. a screenreader | |
Abstract
Pretty printing is the task of nicely formatting tree structured data within a given line width limit. In 1980 Oppen published a pretty printing algorithm that takes time linear in the size of the input, independent of the line width, and uses only limited look-ahead. This work inspired the development of a number of purely functional pretty printing libraries in Haskell. Here I present a new functional pretty printing algorithm that has all the nice properties of Oppen's and is surprisingly simple. A double-ended queue of delimited continuations is the key to addressing all aspects of the problem explicitly.
| Item Type: | Reports and Papers (Technical report) |
|---|---|
| Uncontrolled keywords: | Haskell, double-ended queue, least-strict, lazy |
| Subjects: | Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming, |
| Institutional Unit: | Schools > School of Computing |
| Former Institutional Unit: |
Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
|
| Depositing User: | Olaf Chitil |
| Date Deposited: | 24 Nov 2008 18:04 UTC |
| Last Modified: | 20 May 2025 10:05 UTC |
| Resource URI: | https://kar.kent.ac.uk/id/eprint/14464 (The current URI for this page, for reference purposes) |
- Link to SensusAccess
- Export to:
- RefWorks
- EPrints3 XML
- BibTeX
- CSV
- Depositors only (login required):

https://orcid.org/0000-0001-7986-9929
Total Views
Total Views