PP.ml is an implementation of Wadler-style pretty printing adapted to a call by value language. The OPAM package pprint appears to be similar enough that we could use it instead with few changes.
We are currently using PP.ml only in irtojs where it is used to pretty print JavaScript code. It might make sense to use the pprint library in other places, such as for SQL printing, instead of the current rather low level Format. (It looks like pprint can be used with Format as a backend to print large things efficiently.)
PP.ml
is an implementation of Wadler-style pretty printing adapted to a call by value language. The OPAM packagepprint
appears to be similar enough that we could use it instead with few changes.We are currently using PP.ml only in
irtojs
where it is used to pretty print JavaScript code. It might make sense to use the pprint library in other places, such as for SQL printing, instead of the current rather low levelFormat
. (It looks likepprint
can be used withFormat
as a backend to print large things efficiently.)