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. ... View more
Peyton Jones, Simon L. (1997). A pretty printer library in Haskell. Part of the GHC distribution at http://www.haskell.org/ghc.
Swierstra, S. D., Azero Alocer, P. R., & Saraiva, J. (1999). Designing and implementing combinator languages. Pages 150-206 of: Swierstra, Doaitse, Henriques, Pedro, & Oliveira, Jos´e (eds), Advanced functional programming, third international school, AFP'98. LNCS, vol. 1608. Springer-Verlag.
Swierstra, S. Doaitse. (2004). Linear, online, functional pretty printing (corrected and extended version). Tech. rept. UU-CS-2004-025a. Institute of Information and Computing Sciences, Utrecht University.