Linear, bounded, functional pretty-printing

Swierstra, S. Doaitse and Chitil, Olaf (2009) Linear, bounded, functional pretty-printing. Journal of Functional Programming, 19 (01). pp. 1-16. ISSN 0956-7968. (doi: (Full text available)

Download (227kB) Preview
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
Uncontrolled keywords: non-strict, lazy, Haskell
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Divisions: Faculties > Sciences > School of Computing > Theoretical Computing Group
Depositing User: Olaf Chitil
Date Deposited: 29 Mar 2010 12:11 UTC
Last Modified: 28 Oct 2016 13:45 UTC
Resource URI: (The current URI for this page, for reference purposes)
  • Depositors only (login required):


Downloads per month over past year