Author:
SWIERSTRA S. DOAITSE,CHITIL OLAF
Abstract
AbstractWe present two implementations of Oppen's pretty-printing algorithm in Haskell that meet the efficiency of Oppen's imperative solution but have a simpler and a 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.
Publisher
Cambridge University Press (CUP)
Reference11 articles.
1. Designing and Implementing Combinator Languages
2. Peyton Jones, Simon L. (1997) A Pretty Printer Library in {H}askell. Part of the GHC distribution at http://www.haskell.org/ghc.
3. Using circular programs to eliminate multiple traversals of data
Cited by
20 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Effects as capabilities: effect handlers and lightweight effect polymorphism;Proceedings of the ACM on Programming Languages;2020-11-13
2. FliPpr: A System for Deriving Parsers from Pretty-Printers;New Generation Computing;2018-07
3. A pretty but not greedy printer (functional pearl);Proceedings of the ACM on Programming Languages;2017-08-29
4. Multiple intermediate structure deforestation by shortcut fusion;Science of Computer Programming;2016-12
5. A Lazy Language Needs a Lazy Type System;Proceedings of the 28th Symposium on the Implementation and Application of Functional Programming Languages - IFL 2016;2016