Tutorial/slides on pretty-printing combinators?

Do you know of any tutorial or slides from a talk on one of the pretty-printing libraries? It could be on Text.PrettyPrint.HughesPJ or uulib or any other, similar library. I'm thinking of developing slides for a course, and I'm looking for sources of inspiration. Regards, Sean

Sean Leather:
Do you know of any tutorial or slides from a talk on one of the pretty-printing libraries?
Sean, if you need info just on Haskell solutions, other people will help you. There is a paper: "Linear, bounded, functional pretty-printing" by Doaitse Swierstra and Olaf Chitil (and "Pretty Printer with Lazy Deques" by Olaf, a Functional Pearl if I am not mistaken). BTW, something has been implemented in Scala based on the S. and C. approach. So don't forget about other languages, you may learn something also here: http://caml.inria.fr/pub/docs/manual-ocaml/manual003.html#toc11 OK, these are not slides... Jerzy Karczmarczuk

On 17/11/2011, at 12:31 AM, Jerzy Karczmarczuk wrote:
Sean Leather:
Do you know of any tutorial or slides from a talk on one of the pretty-printing libraries?
Sean, if you need info just on Haskell solutions, other people will help you. There is a paper: "Linear, bounded, functional pretty-printing" by Doaitse Swierstra and Olaf Chitil (and "Pretty Printer with Lazy Deques" by Olaf, a Functional Pearl if I am not mistaken). BTW, something has been implemented in Scala based on the S. and C. approach.
Yes, our Scala port of the continuation-based version from Doaitse and Olaf's paper is in the Kiama library: http://code.google.com/p/kiama http://code.google.com/p/kiama/source/browse/src/org/kiama/util/PrettyPrinte... Some brief slides from a short fpsyd talk on this part of Kiama are at http://code.google.com/p/kiama/wiki/Research. regards, Tony

Hi Sean Doaiste Swierstra has fairly extensive notes on the development of the attribute grammar versions of uulib's pretty printers. The notes are called "Designing and Implementing Combinator Languages". As they were a showcase for UUAG there is quite a lot on attribute grammars in the notes, but the should be still be a good source of inspiration.
participants (4)
-
Jerzy Karczmarczuk
-
Sean Leather
-
Stephen Tetley
-
Tony Sloane