You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is to implement a pretty printing library based on Philip Wadler's "A prettier printer" paper.
The paper already contains code for an implementation, though it is a bit rudimentary. The wl-print Haskell package contains an extension of it, with some extra bells and whistle for convenience.
We can stick with the paper's implementation or something in-between that and wl-print's. We would also demonstrate the library usage by pretty printing one of these:
An ADT, such as the JSON value representation
An AST representation of s-exps (simple AST)
An AST representing some simple imperative language (complex AST)
This has been done before in the chapter 5 of the Real World Haskell book.
The Roc implementation may not be exactly same as the Haskell implementations because of strict-vs-lazy nature of the two languages.
The text was updated successfully, but these errors were encountered:
Sounds good to me! There was a blog post recently on how to take the ideas in that paper a step further, but I don't have a link handy. It gave examples in Rust, which might be easier to port to Roc because they're strictly evaluated.
gvwilson
changed the title
Topic Proposal: A Pretty Printing Library
topic: pretty-printing library
Apr 18, 2024
The idea is to implement a pretty printing library based on Philip Wadler's "A prettier printer" paper.
The paper already contains code for an implementation, though it is a bit rudimentary. The wl-print Haskell package contains an extension of it, with some extra bells and whistle for convenience.
We can stick with the paper's implementation or something in-between that and wl-print's. We would also demonstrate the library usage by pretty printing one of these:
This has been done before in the chapter 5 of the Real World Haskell book.
The Roc implementation may not be exactly same as the Haskell implementations because of strict-vs-lazy nature of the two languages.
The text was updated successfully, but these errors were encountered: