Skip to main content

Linear, bounded, functional pretty-printing

Swierstra, S. Doaitse, Chitil, Olaf (2009) Linear, bounded, functional pretty-printing. Journal of Functional Programming, 19 (01). pp. 1-16. ISSN 0956-7968. (doi:10.1017/S0956796808006990) (KAR id:24041)

Language: English
Download (227kB) Preview
[thumbnail of LinearOlaf.pdf]
This file may not be suitable for users of assistive technology.
Request an accessible format
Official URL


We present two implementations of Oppen's pretty-printing algorithm in Haskell that meet the efficiency of Oppen's imperative solution but have a simpler, clear structure. We start with an implementation that uses lazy evaluation to simulate two co-operating processes. Then we present an implementation that uses higher-order functions for delimited continuations to simulate co-routines with explicit scheduling.

Item Type: Article
DOI/Identification number: 10.1017/S0956796808006990
Uncontrolled keywords: non-strict, lazy, Haskell
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Depositing User: Olaf Chitil
Date Deposited: 29 Mar 2010 12:11 UTC
Last Modified: 16 Feb 2021 12:34 UTC
Resource URI: (The current URI for this page, for reference purposes)
Chitil, Olaf:
  • Depositors only (login required):


Downloads per month over past year