Affiliation:
1. University of Kent, United Kingdom
Abstract
There are several purely functional libraries for converting tree structured data into indented text, but they all make use of some backtracking. Over twenty years ago, Oppen published a more efficient imperative implementation of a pretty printer. This article shows that the same efficiency is also obtainable without destructive updates by developing a similar but purely functional Haskell implementation with the same complexity bounds. At its heart lie two lazy double ended queues.
Publisher
Association for Computing Machinery (ACM)
Cited by
6 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. A Pretty Expressive Printer;Proceedings of the ACM on Programming Languages;2023-10-16
2. Towards a universal code formatter through machine learning;Proceedings of the 2016 ACM SIGPLAN International Conference on Software Language Engineering;2016-10-20
3. Polynomial-Time Optimal Pretty-Printing Combinators with Choice;Lecture Notes in Computer Science;2015
4. A Pretty Good Formatting Pipeline;Software Language Engineering;2013
5. Lazy v. Yield: Incremental, Linear Pretty-Printing;Programming Languages and Systems;2012